import * as React from 'react';
import Box from '@mui/material/Box';
import Button from '@mui/material/Button';
import Card from '@mui/material/Card';
import MuiChip from '@mui/material/Chip';
import Container from '@mui/material/Container';
import Typography from '@mui/material/Typography';
import {styled} from '@mui/material/styles';
import PermMediaIcon from '@mui/icons-material/PermMedia';
import CodeIcon from '@mui/icons-material/Code';
import MonitorHeartIcon from '@mui/icons-material/MonitorHeart';
import ServiceList from "~/components/ServiceList";
const items = [
{
icon: ,
title: 'The Vox Sanctum',
serviceList: [
{
name: "Jellyseerr",
url: "https://jellyseerr.aetoskia.com",
desc: "Summon films and series from the digital void.",
external: true
},
{
name: "Sonarr",
url: "https://sonarr.aetoskia.com",
desc: "Keep the endless chronicles of TV under iron control.",
external: true
},
{
name: "Radarr",
url: "https://radarr.aetoskia.com",
desc: "Command the legions of cinema, enforce cinematic order.",
external: true
},
],
description:
"Behold the archive of visual legends, where the eternal campaigns of film and series march forth in eternal crusade against chaos and forgetfulness.",
},
{
icon: ,
title: 'The Forge Conclave',
serviceList: [
{
name: "Git",
url: "https://git.aetoskia.com",
desc: "Forge and safeguard code like a sacred relic.",
external: true
},
{
name: "Registry",
url: "https://registry.aetoskia.com",
desc: "Monitor core constructs of the digital empire.",
external: true
},
{
name: "Drone",
url: "https://drone.aetoskia.com",
desc: "Automaton architect, building pipelines of perfection.",
external: true
},
],
description:
"The bastion of creation — where code is forged in the fires of discipline, guarded like relics, and deployed with unyielding precision to uphold the empire's might.",
},
{
icon: ,
title: 'The Vigilant Watch',
serviceList: [
{
name: "Netdata",
url: "https://netdata.aetoskia.com",
desc: "Watch over the mechanized legions and digital armories with the unblinking eye of the Omnissiah.",
external: true
},
{
name: "Portainer",
url: "https://portainer.aetoskia.com",
desc: "Oversee the fleet of containers with unyielding vigilance.",
external: true
},
{
name: "Traefik",
url: "https://traefik.aetoskia.com",
desc: "Marshal your gateways and protect the flow between realms.",
external: true
},
],
description:
"Eyes ever watchful, guarding the realm’s sanctity — these sentinels oversee the flow of life and command the paths between digital dominions.",
},
];
interface ChipProps {
selected?: boolean;
}
const Chip = styled(MuiChip)(({theme}) => ({
variants: [
{
props: ({selected}) => !!selected,
style: {
background:
'linear-gradient(to bottom right, hsl(210, 98%, 48%), hsl(210, 98%, 35%))',
color: 'hsl(0, 0%, 100%)',
borderColor: (theme.vars || theme).palette.primary.light,
'& .MuiChip-label': {
color: 'hsl(0, 0%, 100%)',
},
...theme.applyStyles('dark', {
borderColor: (theme.vars || theme).palette.primary.dark,
}),
},
},
],
}));
interface MobileLayoutProps {
selectedItemIndex: number;
handleItemClick: (index: number) => void;
selectedFeature: (typeof items)[0];
}
export function MobileLayout({
selectedItemIndex,
handleItemClick,
selectedFeature,
}: MobileLayoutProps) {
if (!items[selectedItemIndex]) {
return null;
}
return (
{items.map(({title}, index) => (
handleItemClick(index)}
selected={selectedItemIndex === index}
/>
))}
{selectedFeature.title}
{selectedFeature.description}
);
}
export default function Services() {
const [selectedItemIndex, setSelectedItemIndex] = React.useState(0);
const handleItemClick = (index: number) => {
setSelectedItemIndex(index);
};
const selectedFeature = items[selectedItemIndex];
return (
{items.map(({icon, title, description}, index) => (
handleItemClick(index)}
sx={[
(theme) => ({
p: 2,
height: '100%',
width: '100%',
'&:hover': {
backgroundColor: (theme.vars || theme).palette.action.hover,
},
}),
selectedItemIndex === index && {
backgroundColor: 'action.selected',
},
]}
>
{icon} {title}
{description}
))}
);
}