import { ExtractDefaultPropTypes, InjectionKey, PropType, Ref } from 'vue';
export const checkboxGroupProps = {
modelValue: {
type: Array as PropType<Array<string | number | boolean>>,
default: null,
},
disabled: {
type: Boolean,
default: false,
},
};
export type CheckboxGroupProps = ExtractDefaultPropTypes<
typeof checkboxGroupProps
>;
interface CheckboxGroupInjection {
modelValue: Ref<Array<string | number | boolean>>;
disabled: Ref<boolean>;
onChange: (val: Array<string | number | boolean>) => void;
}
export const checkboxGroupKey: InjectionKey<CheckboxGroupInjection> =
Symbol('OCheckboxGroup');