import{B as p}from"./Checkbox.CmdF-nFt.js";import{S as _}from"./Checkmark.DOG99yeO.js";import{v as b,o as r,c,m as i,a as s,G as u,k as m,b as k,H as d,E as h,l as C,q as B}from"./runtime-dom.esm-bundler.tPRhSV4q.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: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:h(()=>{},["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(),m(o,{key:0})):k("",!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:u(["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 L=g(q,[["render",A]]);export{L as B};
