1import{a1 as S,ae as _,af as q,c as n,av as x,M as l,N as o,ai as y,ah as b,aj as B,ak as g,al as d,a5 as i,ag as A,ao as v,ap as N}from"./Czd9XnOY.js";import{g as j}from"./D4UysXM8.js";import{p as w}from"./CRcG_lX9.js";const I=S({__name:"CountryOptionElement",props:{kind:{type:String},item:{type:Object},formLabelVisible:{type:Boolean},formLabelAlignment:{type:String},formattedCountry:{type:String},countries:{type:Array},errors:{type:Object,default:()=>({})}},emits:["addOrUpdateError","updateFormattedCountry"],setup(e,{expose:k,emit:h}){const V=_(),t=e,u=h,{t:C}=q(),L=n(()=>t.kind=="survey"),p=n(()=>t.errors[t.item.tag]),m=n({get:()=>t.formattedCountry,set:a=>{s(a),u("updateFormattedCountry",a)}}),E=()=>{s()},s=a=>{if(!t.item)return;let r;a?r=a:r=m.value,t.item.required&&x(r)?c(t.item.tag,t.item.error??C("is_required",{label:t.item.label})):c(t.item.tag,null)},c=(a,r)=>{u("addOrUpdateError",{tag:a,error:r})};return k({validate:s,validateRequired:E,item:t.item}),(a,r)=>{var f;return e.item?(l(),o("div",{key:0,class:y(["form-builder--item",{"d-none":e.item.hidden,"form-builder--item-input":L.value}])},[e.formLabelVisible?(l(),o("label",{key:0,class:y(b(B)(e.item.labelAlignment,e.formLabelAlignment)),for:e.item.tag},[g(d(e.item.label)+" ",1),e.item.required?(l(),o("span",{key:0},"*")):i("",!0)],10,["for"])):i("",!0),A("div",{class:"flex-col"},[(l(),v(j,{modelValue:m.value,"onUpdate:modelValue":r[0]||(r[0]=O=>m.value=O),placeholder:!e.formLabelVisible&&e.item.required?e.item.placeholder+"*":e.item.placeholder,name:e.item.tag,options:e.countries,allowEmpty:!1,"show-labels":!1,closeOnSelect:!0,disabled:(f=e.item)==null?void 0:f.disabled,class:"multi_select_form",id:e.item.tag,key:"country-option-"+b(V)},null,8,["modelValue","placeholder","name","options","disabled","id"])),e.item.shortLabel?(l(),v(w,{key:0},{default:N(()=>[g(d(e.item.shortLabel),1)]),_:1})):i("",!0)]),p.value?(l(),o("div",{key:1,id:"error-container",class:"error"},d(p.value),1)):i("",!0)],2)):i("",!0)}}});export{I 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.