import{x as s,c_ as q,aA as g,e as y,B,m as p,o as l,a6 as d,c as m,C as E,F as v,y as k}from"./BoB2h2qv.js";import{a as V}from"./iebCrZCv.js";import{V as A}from"./_43AjLD4.js";import{c as $}from"./CkkkpqTL.js";function O(u){return s(()=>q(u)?!!g(u)?.closest("form"):!0)}var H=y({inheritAttrs:!1,__name:"VisuallyHiddenInputBubble",props:{name:{type:String,required:!0},value:{type:null,required:!0},checked:{type:Boolean,required:!1,default:void 0},required:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},feature:{type:String,required:!1,default:"fully-hidden"}},setup(u){const e=u,{primitiveElement:o,currentElement:i}=V(),t=s(()=>e.checked??e.value);return B(t,(r,a)=>{if(!i.value)return;const n=i.value,_=window.HTMLInputElement.prototype,c=Object.getOwnPropertyDescriptor(_,"value").set;if(c&&r!==a){const b=new Event("input",{bubbles:!0}),h=new Event("change",{bubbles:!0});c.call(n,r),n.dispatchEvent(b),n.dispatchEvent(h)}}),(r,a)=>(l(),p(A,d({ref_key:"primitiveElement",ref:o},{...e,...r.$attrs},{as:"input"}),null,16))}}),f=H,I=y({inheritAttrs:!1,__name:"VisuallyHiddenInput",props:{name:{type:String,required:!0},value:{type:null,required:!0},checked:{type:Boolean,required:!1,default:void 0},required:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},feature:{type:String,required:!1,default:"fully-hidden"}},setup(u){const e=u,o=s(()=>typeof e.value=="object"&&Array.isArray(e.value)&&e.value.length===0&&e.required),i=s(()=>typeof e.value=="string"||typeof e.value=="number"||typeof e.value=="boolean"||e.value===null||e.value===void 0?[{name:e.name,value:e.value}]:typeof e.value=="object"&&Array.isArray(e.value)?e.value.flatMap((t,r)=>typeof t=="object"?Object.entries(t).map(([a,n])=>({name:`${e.name}[${r}][${a}]`,value:n})):{name:`${e.name}[${r}]`,value:t}):e.value!==null&&typeof e.value=="object"&&!Array.isArray(e.value)?Object.entries(e.value).map(([t,r])=>({name:`${e.name}[${t}]`,value:r})):[]);return(t,r)=>(l(),m(v,null,[E(" We render single input if it's required "),o.value?(l(),p(f,d({key:t.name},{...e,...t.$attrs},{name:t.name,value:t.value}),null,16,["name","value"])):(l(!0),m(v,{key:1},k(i.value,a=>(l(),p(f,d({key:a.name},{ref_for:!0},{...e,...t.$attrs},{name:a.name,value:a.value}),null,16,["name","value"]))),128))],2112))}}),P=I;/**
 * @license lucide-vue-next v0.487.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const L=$("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);export{L as C,P as V,O as u};
