import {designComponent} from "@peryl/react-compose";
import {createPlcPropOptions, PlcEmitsOptions} from "../plc/utils/plc.utils";
import {PlcScopeSlotsOptions} from "../plc/utils/plc.scope-slots";
import {usePlc} from "../plc/use/usePlc";
import {Checkbox} from "../../Checkbox";
export const PlcCheckbox = designComponent({
name: 'plc-checkbox',
props: {
...createPlcPropOptions({ addEditPadding: true, }),
trueValue: { default: 'Y' as any },
falseValue: { default: 'N' as any },
},
scopeSlots: PlcScopeSlotsOptions,
emits: PlcEmitsOptions,
setup({ props, slots, scopeSlots, event }) {
return usePlc({
props, scopeSlots, event, slots, defaultScopeSlots: {
summary: () => null,
normal: ({ row, plc }) => !plc.props.field ? null :
,
edit: ({ row, plc }) => !plc.props.field ? null :
,
}
});
},
});