/* Copyright © 2024 Melbet - All Rights Reserved */ import{defineComponent as u,computed as c,resolveComponent as I,openBlock as p,createElementBlock as m,normalizeClass as h,createVNode as $,pushScopeId as E,popScopeId as _,createElementVNode as S,unref as o}from"../../../../shared-assets/__shared_vue_deps_SRT2KB67.js";import{m as g,themeType as b,iconName as x,t as f,sizeType as R}from"./entry-Bl6dkD65.js";import{defineEmit as T}from"./D7DCGBNkXt3G.js";import{r as O,u as U}from"./6GmRYzzFuB0k.js";const q=O,N=U;var z=u({name:"UiSelectionIcoCheckbox_F",components:{UiIco:g},props:{theme:{type:String,default:b.gray60},checked:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},hasError:{type:Boolean,default:!1}},setup:e=>({selectionIcoCheckboxClasses:c(()=>({[`selection-ico-checkbox--theme-${e.theme}`]:!!e.theme,"selection-ico-checkbox--checked":e.checked,"selection-ico-checkbox--disabled":e.disabled,"selection-ico-checkbox--has-error":e.hasError})),iconName:x})}),V=f(z,[["render",function(e,d,i,l,t,n){const r=I("UiIco");return p(),m("span",{class:h([e.selectionIcoCheckboxClasses,"selection-ico-checkbox"])},[$(r,{class:"selection-ico-checkbox__ico",ico:e.iconName.CHECK},null,8,["ico"])],2)}],["__scopeId","data-v-45b3ae38"]]),A=u({name:"UiSelectionIcoRadio_F",props:{theme:{type:String,default:b.gray60},checked:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},hasError:{type:Boolean,default:!1}},setup:e=>({selectionIcoRadioClasses:c(()=>({[`selection-ico-radio--theme-${e.theme}`]:!!e.theme,"selection-ico-radio--checked":e.checked,"selection-ico-radio--disabled":e.disabled,"selection-ico-radio--has-error":e.hasError}))})});const F=[(e=>(E("data-v-4f7c1065"),e=e(),_(),e))(()=>S("span",{class:"selection-ico-radio__ico"},null,-1))];var H=f(A,[["render",function(e,d,i,l,t,n){return p(),m("span",{class:h([e.selectionIcoRadioClasses,"selection-ico-radio"])},F,2)}],["__scopeId","data-v-4f7c1065"]]),K=u({name:"UiSelectionIcoTumbler_F",props:{theme:{type:String,default:b.gray},size:{type:String,default:R.m},checked:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},setup:e=>({selectionIcoTumblerClasses:c(()=>({[`selection-ico-tumbler--theme-${e.theme}`]:!!e.theme,[`selection-ico-tumbler--size-${e.size}`]:!!e.size,"selection-ico-tumbler--checked":e.checked,"selection-ico-tumbler--disabled":e.disabled}))})}),D=f(K,[["render",function(e,d,i,l,t,n){return p(),m("span",{class:h([e.selectionIcoTumblerClasses,"selection-ico-tumbler"])},null,2)}],["__scopeId","data-v-ac9b876f"]]),a=(e=>(e.RADIO="radio",e.CHECKBOX="checkbox",e.TUMBLER="tumbler",e))(a||{});const w=({type:e})=>({component:c(()=>{switch(o(e)){case a.TUMBLER:return D;case a.RADIO:return H;case a.CHECKBOX:default:return V}})}),G={type:{type:String,required:!0},selectedValue:{type:[String,Number,Boolean,Function,Object,Array],default:void 0},value:{type:[String,Number,Boolean,Function,Object,Array],default:void 0}},J=({type:e,selectedValue:d,modelValue:i,value:l})=>{const t=i,n=T(N),r=c(()=>o(e)===a.RADIO),B=c(()=>o(e)===a.TUMBLER?a.CHECKBOX:o(e)),C=c(()=>{var s,y,k;return o(r)?o(l)===o(t):(k=(y=(s=o(t))==null?void 0:s.includes)==null?void 0:y.call(s,o(l)))!=null?k:o(t)===!0}),v=c({get:()=>o(t),set:s=>n(s)});return{inputType:B,isChecked:C,isRadio:r,modelValue:v}};export{N as c,G as i,V as l,H as n,q as r,a as r$1,w as s,D as u,J as u$1};