import { ID } from "../../types/index.mjs"; import { AtomProps } from "../Atom/Atom.vue.mjs"; import "../Atom/index.mjs"; import { GroupContext, GroupTicket } from "../../composables/createGroup/index.mjs"; import { MaybeRefOrGetter } from "vue"; //#region src/components/Switch/SwitchGroup.vue.d.ts /** Ticket for switch items with element reference for focus management */ interface SwitchTicket extends GroupTicket { /** Element reference for group focus management */ el?: MaybeRefOrGetter; } /** Imperative handle exposed by Switch.Group. */ interface SwitchGroupExpose { /** Focus the selected switch, or the first if none is selected. */ focus: (options?: FocusOptions) => void; } interface SwitchGroupProps extends AtomProps { /** Namespace for context provision to children */ namespace?: string; /** Disables all switches in the group */ disabled?: boolean; /** Auto-select items on registration */ enroll?: boolean; /** Require at least one switch to be on. `'force'` prevents deselecting the last item */ mandatory?: boolean | 'force'; /** Accessible group label */ label?: string; /** ID of element that labels this group */ ariaLabelledby?: string; /** ID of element that describes this group */ ariaDescribedby?: string; } interface SwitchGroupSlotProps { /** Whether the group is disabled */ isDisabled: boolean; /** Whether no switches are on */ isNoneSelected: boolean; /** Whether all switches are on */ isAllSelected: boolean; /** Whether some but not all switches are on */ isMixed: boolean; /** Turn on specific switches by ID */ select: (id: ID | ID[]) => void; /** Turn off specific switches by ID */ unselect: (id: ID | ID[]) => void; /** Toggle specific switches by ID */ toggle: (id: ID | ID[]) => void; /** Turn on all switches */ selectAll: () => void; /** Turn off all switches */ unselectAll: () => void; /** Toggle all switches */ toggleAll: () => void; /** Pre-computed ARIA attributes for the group element */ attrs: { 'role': 'group'; 'aria-label': string | undefined; 'aria-labelledby': string | undefined; 'aria-describedby': string | undefined; }; } declare const useSwitchGroup: (key: string, defaultValue?: GroupContext> | undefined) => GroupContext>, provideSwitchGroup: (key: string, context: GroupContext>, app?: import("vue").App) => GroupContext>; declare const _default: typeof __VLS_export; declare const __VLS_export: (__VLS_props: NonNullable>["props"], __VLS_ctx?: __VLS_PrettifyLocal>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable>["expose"], __VLS_setup?: Promise<{ props: import("vue").PublicProps & __VLS_PrettifyLocal<(SwitchGroupProps & { modelValue?: T | T[]; }) & { "onUpdate:modelValue"?: ((value: T | T[] | undefined) => any) | undefined; "onUpdate:model-value"?: ((value: T | T[]) => any) | undefined; }> & (typeof globalThis extends { __VLS_PROPS_FALLBACK: infer P; } ? P : {}); expose: (exposed: import("vue").ShallowUnwrapRef) => void; attrs: any; slots: { default: (props: SwitchGroupSlotProps) => any; }; emit: ((evt: "update:model-value", value: T | T[]) => void) & ((event: "update:modelValue", value: T | T[] | undefined) => void); }>) => import("vue").VNode & { __ctx?: NonNullable>; }; type __VLS_PrettifyLocal = (T extends any ? { [K in keyof T]: T[K]; } : { [K in keyof T as K]: T[K]; }) & {}; //#endregion export { SwitchGroupExpose, SwitchGroupProps, SwitchGroupSlotProps, SwitchTicket, _default as default, provideSwitchGroup, useSwitchGroup };