import{B as p}from"./Checkbox.CxE2HV-P.js";import{S as _}from"./Checkmark.DL3UTTgg.js";import{_ as c,a as d,w as b}from"./_plugin-vue_export-helper.BLXtEB-G.js";import{v as k,o as r,c as m,m as i,a as s,aa as u,k as g,b as h,l as C,q as B}from"./runtime-core.esm-bundler.DMBo7TXk.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=k("svg-checkmark");return r(),m("label",{class:u(["aioseo-radio",[e.labelClass,{[e.size]:e.size},a.typeClass,{disabled:e.disabled}]]),onKeydown:[t[1]||(t[1]=d((...l)=>a.labelToggle&&a.labelToggle(...l),["enter"])),t[2]||(t[2]=d((...l)=>a.labelToggle&&a.labelToggle(...l),["space"]))],onClick:b(()=>{},["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:u(e.inputClass),ref:"input"},null,42,z),s("span",x,[e.type===1?(r(),g(o,{key:0})):h("",!0)])])]),i(n.$slots,"default")],34)}const w=c(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(),m("div",{class:u(["aioseo-highlight-toggle",[{active:e.active},{[e.size]:e.size}]]),onClick:t[1]||(t[1]=(...o)=>a.toggleCheckbox&&a.toggleCheckbox(...o))},[(r(),g(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 R=c(q,[["render",A]]);export{R as B};
