import{_ as B,d as m,c as h,t as y,m as b,f as d,J as C,n as x,y as p,q as n,l as o,ae as v,j as f,B as S,P as A,C as T}from"./entry.4d7b4fe3.js";import{s as I,_ as M}from"./audio.c2d916a2.js";import{S as k}from"./icon-arrow.f2baa589.js";const N={inheritAttrs:!1,props:{id:{type:String,required:!0},modelValue:{type:String,default:""},label:String,helper:String},emits:["update:modelValue"],computed:{attrs(){return{placeholder:"Input field",name:`input-${this.id}`,...this.$attrs}}}},P={class:x(["c-base-input-text","flex flex-col gap-y-xs"])},L=["for"],R=["textContent"],U=["textContent"],j=["id","value"];function q(a,u,e,i,s,r){return m(),h("div",P,[e.label||e.helper?(m(),h("label",{key:0,class:"flex flex-col gap-y-[2px]",for:e.id},[e.label?(m(),h("div",{key:0,class:"text-button",textContent:y(e.label)},null,8,R)):b("",!0),e.helper?(m(),h("div",{key:1,class:"text-underline opacity-60",textContent:y(e.helper)},null,8,U)):b("",!0)],8,L)):b("",!0),d("input",C({id:e.id,value:e.modelValue,type:"text",class:["px-[28px] py-[20px] text-button outline-none","border border-strong border-opacity-20","focus:border-opacity-100","placeholder:opacity-40"]},r.attrs,{onInput:u[0]||(u[0]=({target:_})=>a.$emit("update:modelValue",_.value))}),null,16,j)])}const D=B(N,[["render",q]]),F=["innerHTML"],H={class:"text-button mb-sm >=960:mb-0 s-rich-text"},z={class:"text-underline opacity-60 -mt-[20px] s-rich-text"},E={class:"flex justify-between"},O={__name:"ShareModalSolidarity",props:{solidarity_title:String,solidarity_text:Array,disclaimer:Array,direction:String},emits:["switch"],setup(a,{emit:u}){const e=p(""),i=p(""),s=p(null),r=p(!1);function _(){const t=new Date().getTime();r.value=!0,I(`In solidarity (Name: ${e.value}, region: ${i.value}, time: ${t})`,s.value,{senders_name:e.value,senders_region:i.value}).catch(l=>{u("switch","ShareModalFinal",l),console.error(l),r.value=!1}).then(()=>{u("switch","ShareModalFinal"),r.value=!1})}return(t,l)=>{const g=A,V=D,w=M,$=T;return m(),h("div",{class:x(["c-share-modal-solidarity","duration-300 ease-smooth u-direction-based",{"opacity-30":o(r)}])},[d("h2",{class:x(["font-gt-america-extended font-medium","text-h1 uppercase -mt-2xs"]),innerHTML:a.solidarity_title.replaceAll("\\n","<br />")},null,8,F),d("div",{class:x(["c-share-modal-solidarity ","flex flex-col gap-y-lg mt-sm ",{">=960:ml-5/12col >=960:-mt-lg":a.direction=="ltr"||!a.direction,">=960:mr-4/12col >=960:ml-1/12col":a.direction=="rtl"}])},[d("p",H,[n(g,{field:a.solidarity_text},null,8,["field"])]),n(V,{id:"share-modal-name",modelValue:o(e),"onUpdate:modelValue":l[0]||(l[0]=c=>v(e)?e.value=c:null),label:t.$t("enter-your-name"),helper:t.$t("leave-it-blank"),placeholder:t.$t("name")},null,8,["modelValue","label","helper","placeholder"]),n(V,{id:"share-modal-region",modelValue:o(i),"onUpdate:modelValue":l[1]||(l[1]=c=>v(i)?i.value=c:null),label:t.$t("enter-your-region"),helper:t.$t("leave-it-blank"),placeholder:t.$t("region")},null,8,["modelValue","label","helper","placeholder"]),n(w,{modelValue:o(s),"onUpdate:modelValue":l[2]||(l[2]=c=>v(s)?s.value=c:null)},null,8,["modelValue"]),d("div",z,[n(g,{field:a.disclaimer},null,8,["field"])]),d("div",E,[n($,{direction:a.direction,onClick:l[3]||(l[3]=()=>t.$emit("switch","ShareModalIntro"))},{icon:f(()=>[n(o(k),{class:"-scale-x-[1]"})]),default:f(()=>[S(y(t.$t("back")),1)]),_:1},8,["direction"]),n($,C({direction:a.direction=="ltr"?"rtl":"ltr"},o(s)?{}:{disabled:!0},{onClick:_}),{icon:f(()=>[n(o(k),{class:"-scale-x-[1]"})]),default:f(()=>[S(y(t.$t("next")),1)]),_:1},16,["direction"])])],2)],2)}}};export{O as default};