import{B as p}from"./Checkbox.D2dfpbIi.js";import{S as _}from"./Checkmark.pCOnqh_g.js";import{x as b,o as r,c,q as i,a as s,H as d,l as m,d as h,I as u,G as k,m as C,v as B}from"./vue.esm-bundler.CWQFYt9y.js";import{_ as g}from"./_plugin-vue_export-helper.BN1snXvA.js";const S={components:{SvgCheckmark:_},props:{modelValue:[String,Boolean],name:String,labelClass:{type:String,default(){return""}},inputClass:{type:String,default(){return""}},id:String,size:String,disabled:Boolean,type:{type:Number,default(){return 1}}},computed:{typeClass(){return`type-${this.type}`}},methods:{labelToggle(){this.$refs.input.click()}}},v={class:"form-radio-wrapper"},V={class:"form-radio"},z=["checked","disabled","name","id"],x={class:"fancy-radio"};function T(n,t,e,f,y,a){const o=b("svg-checkmark");return r(),c("label",{class:d(["aioseo-radio",[e.labelClass,{[e.size]:e.size},a.typeClass,{disabled:e.disabled}]]),onKeydown:[t[1]||(t[1]=u((...l)=>a.labelToggle&&a.labelToggle(...l),["enter"])),t[2]||(t[2]=u((...l)=>a.labelToggle&&a.labelToggle(...l),["space"]))],onClick:k(()=>{},["stop"])},[i(n.$slots,"header"),s("span",v,[s("span",V,[s("input",{type:"radio",onInput:t[0]||(t[0]=l=>n.$emit("update:modelValue",l.target.checked)),checked:e.modelValue,disabled:e.disabled,name:e.name,id:e.id,class:d(e.inputClass),ref:"input"},null,42,z),s("span",x,[e.type===1?(r(),m(o,{key:0})):h("",!0)])])]),i(n.$slots,"default")],34)}const w=g(S,[["render",T]]),q={components:{BaseCheckbox:p,BaseRadio:w},props:{type:{type:String,required:!0},name:{type:String,required:!0},modelValue:{type:[Boolean,String,Event],required:!0},active:Boolean,size:String,round:Boolean},methods:{toggleCheckbox(){this.$refs.toggle.labelToggle()}}};function A(n,t,e,f,y,a){return r(),c("div",{class:d(["aioseo-highlight-toggle",[{active:e.active},{[e.size]:e.size}]]),onClick:t[1]||(t[1]=(...o)=>a.toggleCheckbox&&a.toggleCheckbox(...o))},[(r(),m(B(`base-${e.type}`),{ref:"toggle",name:e.name,modelValue:e.modelValue,size:e.size,round:e.round,"onUpdate:modelValue":t[0]||(t[0]=o=>n.$emit("update:modelValue",o))},{default:C(()=>[i(n.$slots,"default")]),_:3},8,["name","modelValue","size","round"]))],2)}const K=g(q,[["render",A]]);export{K as B};
