import{defineComponent as i,computed as h,createVNode as p}from"vue";import k from"../_util/classNames.mjs";import f from"../config-provider/hooks/useConfigInject.mjs";import m from"./style/index.mjs";const C=()=>({prefixCls:String,checked:{type:Boolean,default:void 0},onChange:{type:Function},onClick:{type:Function},"onUpdate:checked":Function}),S=i({compatConfig:{MODE:3},name:"ACheckableTag",inheritAttrs:!1,props:C(),setup(c,{slots:o,emit:n,attrs:a}){const{prefixCls:e}=f("tag",c),[l,s]=m(e),r=d=>{const{checked:t}=c;n("update:checked",!t),n("change",!t),n("click",d)},u=h(()=>k(e.value,s.value,{[`${e.value}-checkable`]:!0,[`${e.value}-checkable-checked`]:c.checked}));return()=>l(p("span",{...a,class:[u.value,a.class],onClick:r},[o.default?.()]))}});export{S as default};
