1import{_ as O}from"./CSRWUXxg.js";import{y as T,ay as W,ai as C,A as r,a4 as i,X as _,al as M,at as h,ah as k,aj as L,ag as v,ak as f,a1 as j,a0 as F,az as K,D as y,j as $,aq as S,_ as s,a9 as A,a5 as w}from"./D0rPpKiU.js";import{_ as U}from"./DoXveZxd.js";import{H as q}from"#entry";import"./Cm11KPhQ.js";import"./BCTa1yj3.js";import"./BHe9BvlE.js";import"./D_gTWDL9.js";const E={key:0,class:"relative mb-4"},H=["onClick","aria-label"],I={class:"flex flex-1 items-center min-w-0"},Q=["aria-expanded","placeholder"],X={key:0,class:"absolute z-50 w-full mt-1 bg-white border border-cool-grey-250 rounded-sm shadow-lg max-h-48 overflow-y-auto",role:"listbox"},Y=["onClick","aria-selected"],G={key:0,xmlns:"http://www.w3.org/2000/svg",style:{"margin-right":"5px",display:"block","shape-rendering":"auto"},class:"h-5 w-5 animate-spin",viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid"},J=T({__name:"RsvpFormFuturehuman",props:K({blok:{}},{workshops:{default:[]},workshopsModifiers:{}}),emits:["update:workshops"],setup(u){const x=u,m=y(()=>{const l=x.blok?.workshops?.tbody;return!l||!Array.isArray(l)?[]:l.map(e=>{const n=e.body?.map(b=>b.value)||[];return{label:n[0]||"",value:n[1]||n[0]||""}}).filter(e=>e.label||e.value)}),o=W(u,"workshops"),d=$(""),a=$(!1),c=y(()=>{const l=o.value,e=m.value;return d.value.trim()?e.filter(n=>!l.includes(n.value)&&n.label.toLowerCase().includes(d.value.toLowerCase())):e.filter(n=>!l.includes(n.value))}),g=l=>{o.value.includes(l)||(o.value=[...o.value,l]),d.value="",a.value=!1},B=l=>{o.value=o.value.filter(e=>e!==l)},z=y(()=>{switch(x.blok?.btn_alignment){case"justify-center":return"justify-center";case"justify-end":return"justify-end";default:return"justify-start"}});return(l,e)=>{const n=O,b=S("editable");return C((s(),r("div",{class:f(["w-full is-futurehuman",u.blok.form_width||"w-full"])},[!u.blok.hide_workshop&&m.value.length>0?(s(),r("div",E,[i("div",{class:"group min-h-12 border border-cool-grey-250 rounded-sm bg-white px-4 py-2 flex flex-wrap gap-2 items-center focus-within:border-purple-600 hover:border-cool-grey-400 transition-colors cursor-pointer",onClick:e[4]||(e[4]=t=>a.value=!a.value),"aria-label":"Workshop selection"},[(s(!0),r(_,null,M(o.value,t=>(s(),r("span",{key:t,class:"inline-flex items-center gap-1 pl-2 pr-1 py-0.5 body-xs rounded bg-purple-50 text-purple-700 border border-purple-200"},[A(w(m.value.find(p=>p.value===t)?.label||t)+" ",1),i("button",{type:"button",class:"w-4 h-4 rounded-full hover:bg-purple-100 flex items-center justify-center text-purple-500",onClick:k(p=>B(t),["stop"]),"aria-label":`Remove ${t}`},[...e[7]||(e[7]=[i("svg",{class:"w-3 h-3",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.5"},[i("path",{d:"M18 6L6 18M6 6l12 12"})],-1)])],8,H)]))),128)),i("div",I,[m.value.length>0?C((s(),r("input",{key:0,"onUpdate:modelValue":e[0]||(e[0]=t=>d.value=t),type:"text",role:"combobox","aria-expanded":a.value,"aria-haspopup":"listbox",placeholder:o.value.length===0?u.blok.workshop_label||"Select workshops...":"Add more...",class:"flex-1 min-w-[120px] h-8 bg-transparent body text-cool-grey-900 placeholder:text-cool-grey-700 focus:outline-none cursor-pointer",onKeydown:[e[1]||(e[1]=h(k(t=>c.value.length===1?g(c.value[0].value):null,["prevent"]),["enter"])),e[2]||(e[2]=h(k(t=>a.value=!0,["prevent"]),["down"])),e[3]||(e[3]=h(t=>a.value=!1,["escape"]))],readonly:""},null,40,Q)),[[L,d.value]]):v("",!0),(s(),r("svg",{class:f(["w-4 h-4 text-cool-grey-400 shrink-0 ml-1 transition-transform",{"rotate-180":a.value}]),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2","aria-hidden":"true"},[...e[8]||(e[8]=[i("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M19 9l-7 7-7-7"},null,-1)])],2))])]),a.value&&c.value.length>0?(s(),r("div",X,[(s(!0),r(_,null,M(c.value,t=>(s(),r("button",{key:t.value,type:"button",class:f(["w-full px-4 py-2.5 text-left body text-cool-grey-900 hover:bg-cool-grey-50 transition-colors",{"bg-purple-50 text-purple-700":o.value.includes(t.value)}]),onClick:p=>g(t.value),role:"option","aria-selected":o.value.includes(t.value)},w(t.label),11,Y))),128))])):v("",!0),a.value?(s(),r("div",{key:1,class:"fixed inset-0 z-40",onClick:e[5]||(e[5]=t=>a.value=!1)})):v("",!0)])):v("",!0),j(n,{blok:u.blok,workshops:o.value,"onUpdate:workshops":e[6]||(e[6]=t=>o.value=t),extras:{formClass:"fh-form"}}
1,{submit:F(({isLoading:t,cta:p,btnVariant:R,btnColor:N,btnSize:V,btnFullWidth:D})=>[i("div",{class:f(["flex",z.value])},[j(U,{type:"submit",disabled:t,variant:R||"primary",color:N||"futurehuman",size:V||"md","full-width":D??!1,"no-auto-margin":""},{default:F(()=>[t?(s(),r("svg",G,[...e[9]||(e[9]=[i("path",{d:"M10 50A40 40 0 0 0 90 50A40 42 0 0 1 10 50",fill:"black",stroke:"none"},[i("animateTransform",{attributeName:"transform",type:"rotate",dur:"1s",repeatCount:"indefinite",keyTimes:"0;1",values:"0 50 51;360 50 51"})],-1)])])):v("",!0),A(" "+w(p),1)]),_:2},1032,["disabled","variant","color","size","full-width"])],2)]),_:1},8,["blok","workshops"])],2)),[[b,u.blok]])}}}),ae=Object.assign(q(J,[["__scopeId","data-v-736eb899"]]),{__name:"RsvpFormFuturehuman"});export{ae 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.