import{y as f,d as v,c as S,f as o,n as c,q as t,l as s,ae as b,j as r,B as h,t as x,J as w,P as B,C as T}from"./entry.4d7b4fe3.js";import{s as A,_ as M}from"./audio.c2d916a2.js";import{S as y}from"./icon-arrow.f2baa589.js";const V=["innerHTML"],k={class:"font-gt-america text-button mb-sm >=960:mb-0 s_rich_text"},C={class:"text-underline opacity-60 -mt-[20px] s-rich-text"},P={class:"flex justify-between"},R={__name:"ShareModalStory",props:{story_title:String,story_text:Array,disclaimer:Array,direction:String},emits:["switch"],setup(e,{emit:d}){const l=f(!1),a=f(null);function _(){l.value=!0,A(`Their story (time: ${new Date().getTime()})`,a.value).catch(i=>{console.error(i),d("switch","ShareModalFinal",i),l.value=!1}).then(()=>{d("switch","ShareModalFinal"),l.value=!1})}return(i,n)=>{const m=B,g=M,u=T;return v(),S("div",{class:c(["c-share-modal-story","duration-300 ease-smooth u-direction-based",{"opacity-30":s(l)}])},[o("h2",{class:c(["font-gt-america-extended font-medium","text-h1 uppercase -mt-2xs"]),innerHTML:e.story_title.replaceAll("\\n","<br />")},null,8,V),o("div",{class:c(["c-share-modal-solidarity","flex flex-col gap-y-lg mt-sm",{">=960:ml-5/12col >=960:-mt-lg":e.direction=="ltr"||!e.direction,">=960:mr-4/12col >=960:ml-1/12col":e.direction=="rtl"}])},[o("p",k,[t(m,{field:e.story_text},null,8,["field"])]),t(g,{modelValue:s(a),"onUpdate:modelValue":n[0]||(n[0]=p=>b(a)?a.value=p:null)},null,8,["modelValue"]),o("div",C,[t(m,{field:e.disclaimer},null,8,["field"])]),o("div",P,[t(u,{direction:e.direction,onClick:n[1]||(n[1]=()=>i.$emit("switch","ShareModalIntro"))},{icon:r(()=>[t(s(y),{class:"-scale-x-[1]"})]),default:r(()=>[h(x(i.$t("back")),1)]),_:1},8,["direction"]),t(u,w({direction:e.direction=="ltr"?"rtl":"ltr"},s(a)?{}:{disabled:!0},{onClick:_}),{icon:r(()=>[t(s(y),{class:"-scale-x-[1]"})]),default:r(()=>[h(x(i.$t("next")),1)]),_:1},16,["direction"])])],2)],2)}}};export{R as default};