1import{v as a,u as e,a as l}from"./DmyHMY4O.js";import{d as s,v as t,p as o,n as u,j as i,l as n,F as d,E as r,m,s as v,o as b,G as c,q as p,K as k,D as f}from"./DBRbC-fC.js";const y={class:"flex gap-2.5"},x=["for"],g={key:0,class:"text-red-500 text-xs mt-1"},_=s({__name:"InputRadio",props:{blok:{type:Object,required:!0},slug:{type:String}},emits:["update:modelValue"],setup(s,{emit:_}){var V;const j=s;let w=[];if(j.blok&&j.blok.validation_rules){const e=j.blok.validation_rules.map((a=>a.content));w=a(e)}const h=t(""),q=_,C=t(),{value:B,validate:D}=e(j.blok.name,w.join("|"),{initialValue:null==(V=j.blok.options.find((a=>"selected"==a.status)))?void 0:V.value}),E=async a=>{const e=await D();h.value=e.errors[0]};return(a,e)=>{const t=u("editable");return o((b(),i("div",y,[(b(!0),i(d,null,r(s.blok.options,(a=>(b(),i("div",{key:a._uid,class:"flex items-center my-2"},[c(m(l),{id:a._uid,modelValue:m(B),"onUpdate:modelValue":e[0]||(e[0]=a=>k(B)?B.value=a:null),disabled:"disabled"==a.status,name:s.blok.name,value:a.value,class:"w-4 h-4 text-blue-600 bg-primary-thin-50 border-gray-300 focus:ring-blue-500 focus:ring-2",type:"radio",onBlur:E,onClick:e=>(a=>{if(a===C.value)return B.value=null,C.value=null,void q("update:modelValue",null);C.value=a,q("update:modelValue",a)})(a.value)},null,8,["id","modelValue","disabled","name","value","onClick"]),p("label",{class:f(["ms-2 text-sm font-medium","disabled"==a.status?"text-gray-400 cursor-not-allowed":"text-gray-900"]),for:a._uid},v(a.label),11,x)])))),128)),m(h)?(b(),i("p",g,v(m(h)),1)):n("",!0)])),[[t,s.blok]])}}});export{_};
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.