import { CatalogDetailEditValues, CatalogDetailSubFamilyEditValues } from '@zeniai/client-epic-state'; /** * The inline-edit form on `InvoicingCatalogItemDetailPage` renders the shared * form elements, which hold richer shapes than the CES edit values: a picker * writes `{allOptions, selectedOption}` once touched (a plain string until * then) and `LabeledFormattedTextField` writes a plain number where CES keeps * an `Amount`. The form therefore works on these types and converts back with * {@link toCatalogDetailEditValues} on save, so the request body is unchanged. */ type CatalogEditPickerValue = string | { allOptions?: { label: string; value: string; }[]; selectedOption?: string; }; interface CatalogDetailTierFormValues extends Omit { pricingType: CatalogEditPickerValue; /** Unset until entered, so a blank field stays distinct from a real 0. */ price?: number | null; } interface CatalogDetailSubFamilyFormValues extends Omit { period: CatalogEditPickerValue; periodUnit: CatalogEditPickerValue; pricingModel: CatalogEditPickerValue; prorationType: CatalogEditPickerValue; tiers: CatalogDetailTierFormValues[]; trialEndAction: CatalogEditPickerValue; trialPeriodUnit: CatalogEditPickerValue; /** Unset until entered, so a blank field stays distinct from a real 0. */ priceDollars?: number | null; } export interface CatalogDetailEditFormValues extends Omit { /** A picker here too, so the row matches the create form's control. */ itemApplicability: CatalogEditPickerValue; subFamilies: CatalogDetailSubFamilyFormValues[]; } /** Read a picker field whether it still holds the seeded string or a selection. */ export declare const selectedOptionOf: (value: CatalogEditPickerValue | undefined) => string; export declare const toCatalogDetailEditFormValues: (values: CatalogDetailEditValues) => CatalogDetailEditFormValues; export declare const toCatalogDetailEditValues: (values: CatalogDetailEditFormValues, currencyCode: string, currencySymbol: string) => CatalogDetailEditValues; export {};