/** * Create Group Sub-Panel * Panel for creating new groups within the host details */ import { FolderPlus,HelpCircle,Plus } from 'lucide-react'; import React from 'react'; import { useI18n } from '../../application/i18n/I18nProvider'; import { AsidePanel,AsidePanelContent,type AsidePanelLayout,type AsidePanelResizeProps } from '../ui/aside-panel'; import { Button } from '../ui/button'; import { Card } from '../ui/card'; import { Input } from '../ui/input'; interface ToggleRowProps { label: string; enabled: boolean; onToggle: () => void; } const ToggleRow: React.FC = ({ label, enabled, onToggle }) => (
{label}
); export interface CreateGroupPanelProps { newGroupName: string; setNewGroupName: (name: string) => void; newGroupParent: string; setNewGroupParent: (parent: string) => void; groups: string[]; onSave: () => void; onBack: () => void; onCancel: () => void; layout?: AsidePanelLayout; } export type CreateGroupPanelPropsWithResize = CreateGroupPanelProps & AsidePanelResizeProps; export const CreateGroupPanel: React.FC = ({ newGroupName, setNewGroupName, newGroupParent, setNewGroupParent, groups, onSave, onBack, onCancel, layout = 'overlay', resizable, persistWidthStorageKey, resizeAriaLabel, }) => { const { t } = useI18n(); return ( {t('common.save')} } >

{t('hostDetails.group.general')}

setNewGroupName(e.target.value)} className="h-10 flex-1" autoFocus />
setNewGroupParent(e.target.value)} list="parent-group-options" className="h-10" /> {groups.map((g) =>

{t('hostDetails.group.cloudSync')}

{ }} />
); }; export default CreateGroupPanel;