diff --git a/apps/backoffice/src/app/features/certificate-designer/components/DesignerToolbar.tsx b/apps/backoffice/src/app/features/certificate-designer/components/DesignerToolbar.tsx new file mode 100644 index 000000000..fc6dff825 --- /dev/null +++ b/apps/backoffice/src/app/features/certificate-designer/components/DesignerToolbar.tsx @@ -0,0 +1,92 @@ +import { Button, Group, NumberInput, Select, Tooltip } from '@mantine/core'; +import { IconPlus } from '@tabler/icons-react'; +import { useTranslation } from 'react-i18next'; +import { useLocalized, type LicenseType } from '@ema-platform/api'; + +interface Props { + licenseTypes: LicenseType[]; + typeId: string | null; + onTypeChange: (id: string | null) => void; + validityMonths: number; + onValidityChange: (months: number) => void; + currentValidityMonths?: number | null; + canEdit: boolean; + savingValidity: boolean; + onSaveValidity: () => void; + onNewVersion: () => void; +} + +/** Licence type, certificate validity, and the entry point for a new version. */ +export function DesignerToolbar({ + licenseTypes, + typeId, + onTypeChange, + validityMonths, + onValidityChange, + currentValidityMonths, + canEdit, + savingValidity, + onSaveValidity, + onNewVersion, +}: Props) { + const { t } = useTranslation(); + const localized = useLocalized(); + + return ( + +