import { type Keyable, type SortType } from '@myparcel-pdk/common'; import { type InteractiveElementInstance } from '@myparcel/vue-form-builder'; import { type AdminIcon } from '../data'; import { type Translatable, type Translation } from './language.types'; export type GlobalFieldProps = { description?: Translation; subtext?: Translation; value?: unknown; }; export type ElementInstance = InteractiveElementInstance>; export type OptionsProp = { options?: SelectOption[]; sort?: SortType; }; export type PdkElementProps = { element: ElementInstance; modelValue: ModelValue; }; export type PdkElementEmits = (event: 'update:modelValue', value: ModelValue) => void; export type RadioGroupOption = SelectOption & { image?: string; icon?: AdminIcon; }; interface BaseSelectOption { disabled?: boolean; icon?: string | AdminIcon; image?: string; description?: Translatable; value: Value; } export interface SelectOptionWithLabel extends BaseSelectOption { label: T; } export interface SelectOptionWithPlainLabel extends BaseSelectOption { plainLabel: T; } export type SelectOptionValue = Keyable | boolean; export type SelectOption = SelectOptionWithLabel | SelectOptionWithPlainLabel; export {};