1import{r as $,_ as A}from"./DX6o09eQ.js";import{_ as k,ac as C,ad as l,j,ae as b,a6 as n,ai as B,D as G,o as r,c as i,a as U,x as y,af as v,d as w,t as z,l as F,F as N,r as _,k as D,w as T,ag as h,cm as s}from"./DIQ1dSc3.js";import{u as E}from"./9vMxpzyZ.js";import"./CJticlRS.js";const I={wrapper:"relative flex items-start",fieldset:"",legend:"text-sm font-medium text-gray-700 dark:text-gray-200 mb-1",default:{color:"primary"}},d=C(l.ui.strategy,l.ui.radioGroup,I),L=C(l.ui.strategy,l.ui.radio,$),P=j({components:{URadio:A},inheritAttrs:!1,props:{modelValue:{type:[String,Number,Object],default:""},name:{type:String,default:null},legend:{type:String,default:null},options:{type:Array,default:()=>[]},optionAttribute:{type:String,default:"label"},valueAttribute:{type:String,default:"value"},disabled:{type:Boolean,default:!1},color:{type:String,default:()=>d.default.color,validator(e){return l.ui.colors.includes(e)}},class:{type:[String,Object,Array],default:()=>""},ui:{type:Object,default:()=>({})},uiRadio:{type:Object,default:()=>({})}},emits:["update:modelValue","change"],setup(e,{emit:o}){const{ui:m,attrs:c}=b("radioGroup",n(e,"ui"),d,n(e,"class")),{ui:f}=b("radio",n(e,"uiRadio"),L),{emitFormChange:g,color:u,name:t}=E(e,d);B("radio-group",{color:u,name:t});const p=a=>{o("update:modelValue",a),o("change",a),g()},O=a=>s(a,e.valueAttribute,s(a,e.optionAttribute)),R=a=>s(a,e.optionAttribute,s(a,e.valueAttribute)),S=a=>["string","number","boolean"].includes(typeof a)?{value:a,label:a}:{...a,value:O(a),label:R(a)},V=G(()=>e.options.map(a=>S(a)));return{ui:m,uiRadio:f,attrs:c,normalizedOptions:V,onUpdate:p}}});function q(e,o,m,c,f,g){const u=A;return r(),i("div",{class:y(e.ui.wrapper)},[U("fieldset",h(e.attrs,{class:e.ui.fieldset}),[e.legend||e.$slots.legend?(r(),i("legend",{key:0,class:y(e.ui.legend)},[v(e.$slots,"legend",{},()=>[w(z(e.legend),1)])],2)):F("",!0),(r(!0),i(N,null,_(e.normalizedOptions,t=>(r(),D(u,{key:t.value,label:t.label,"model-value":e.modelValue,value:t.value,help:t.help,disabled:t.disabled||e.disabled,ui:e.uiRadio,onChange:p=>e.onUpdate(t.value)},{label:T(()=>[v(e.$slots,"label",h({ref_for:!0},{option:t}))]),_:2},1032,["label","model-value","value","help","disabled","ui","onChange"]))),128))],16)],2)}const Q=k(P,[["render",q]]);export{Q as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.