import { Sparkles } from 'lucide-react'; import { useTranslation } from 'react-i18next'; export type ProfileDefaultScope = 'all' | 'colour'; interface ProfileDefaultOptionProps { /** "Bambu Lab PLA Basic": the product the default would be for. */ product: string; colorName: string; /** Whether the tab was filled in from an existing default. */ prefilled: boolean; checked: boolean; onCheckedChange: (checked: boolean) => void; scope: ProfileDefaultScope; onScopeChange: (scope: ProfileDefaultScope) => void; /** No material yet: there is no product to save a default for. */ disabled: boolean; } /** * Below the Printers tab (#1326): says when the tab came from the product's * profile default, and offers to save what the tab holds as that default. * * "All colours" is preselected: it is what saves the work on the first spool * of every colour, while a colour of its own is for one calibrated apart. */ export function ProfileDefaultOption({ product, colorName, prefilled, checked, onCheckedChange, scope, onScopeChange, disabled, }: ProfileDefaultOptionProps) { const { t } = useTranslation(); const colour = colorName.trim(); return (
{prefilled && (

)} {checked && !disabled && (
)}
); }