import{i as e,t}from"./react.C6f1lhbS.js";import{r as n}from"./jsx-runtime.DAnAtnt1.js";var r=n(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),i=n(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),a=n(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),o=n(`circle-check`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),s=n(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),c=n(`message-circle`,[[`path`,{d:`M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719`,key:`1sd12s`}]]),l=n(`refresh-ccw`,[[`path`,{d:`M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`14sxne`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16`,key:`1hlbsb`}],[`path`,{d:`M16 16h5v5`,key:`ccwih5`}]]),u=n(`users`,[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`path`,{d:`M16 3.128a4 4 0 0 1 0 7.744`,key:`16gr8j`}],[`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.87`,key:`kshegd`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]),d=n(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),f=e(t(),1);function p(e){let t=(e,t)=>{try{return JSON.parse(e)}catch{return t}};return{couple:{bride:{name:e.BRIDE_NICKNAME??`Bride`,fullName:e.BRIDE_FULLNAME??`Bride`,parents:e.BRIDE_PARENTS??``,instagram:e.BRIDE_INSTAGRAM??``,image:e.BRIDE_IMAGE??`https://placehold.co/600x800`},groom:{name:e.GROOM_NICKNAME??`Groom`,fullName:e.GROOM_FULLNAME??`Groom`,parents:e.GROOM_PARENTS??``,instagram:e.GROOM_INSTAGRAM??``,image:e.GROOM_IMAGE??`https://placehold.co/600x800`}},venue:{name:e.VENUE_NAME??``,address:e.VENUE_ADDRESS??``,latitude:parseFloat(e.VENUE_LAT??`0`),longitude:parseFloat(e.VENUE_LNG??`0`)},events:{akad:{title:e.AKAD_TITLE??`Akad Nikah`,day:e.AKAD_DAY??``,date:e.AKAD_DATE??``,startTime:e.AKAD_START??``,endTime:e.AKAD_END??``,startDateTime:new Date(e.AKAD_ISO_START??`2025-01-01T08:00:00+07:00`),endDateTime:new Date(e.AKAD_ISO_END??`2025-01-01T10:00:00+07:00`)},resepsi:{title:e.RESEPSI_TITLE??`Resepsi`,day:e.RESEPSI_DAY??``,date:e.RESEPSI_DATE??``,startTime:e.RESEPSI_START??``,endTime:e.RESEPSI_END??``,startDateTime:new Date(e.RESEPSI_ISO_START??`2025-01-01T11:00:00+07:00`),endDateTime:new Date(e.RESEPSI_ISO_END??`2025-01-01T14:00:00+07:00`)}},hero:{image:e.HERO_IMAGE??``,city:e.HERO_CITY??``},music:{url:e.MUSIC_URL??``},rsvp:{maxGuests:parseInt(e.RSVP_MAX_GUESTS??`10`,10)},bankAccounts:t(e.BANK_ACCOUNTS,[]),loveStory:t(e.LOVE_STORY,[]),galleryImages:t(e.GALLERY_IMAGES,[]),text:{opening:{salam:e.TEXT_SALAM_OPENING??``},quote:{ar_rum:e.TEXT_QUOTE_AR_RUM??``,source:e.TEXT_QUOTE_SOURCE??``},invitation:e.TEXT_INVITATION??``,closing:{text:e.TEXT_CLOSING??``,salam:e.TEXT_SALAM_CLOSING??``,signature:e.TEXT_SIGNATURE??``,family:e.TEXT_FAMILY??``},gift:{title:e.TEXT_GIFT_TITLE??``,desc:e.TEXT_GIFT_DESC??``}},telegram:{botToken:e.TELEGRAM_BOT_TOKEN??``,chatId:e.TELEGRAM_CHAT_ID??``}}}var m={BRIDE_NICKNAME:`Bride`,GROOM_NICKNAME:`Groom`,BRIDE_FULLNAME:`Bride`,GROOM_FULLNAME:`Groom`,BRIDE_PARENTS:``,GROOM_PARENTS:``,BRIDE_INSTAGRAM:``,GROOM_INSTAGRAM:``,BRIDE_IMAGE:`https://placehold.co/600x800`,GROOM_IMAGE:`https://placehold.co/600x800`,VENUE_NAME:``,VENUE_ADDRESS:``,VENUE_LAT:`0`,VENUE_LNG:`0`,AKAD_TITLE:`Akad Nikah`,AKAD_DAY:``,AKAD_DATE:``,AKAD_START:``,AKAD_END:``,AKAD_ISO_START:`2025-01-01T08:00:00+07:00`,AKAD_ISO_END:`2025-01-01T10:00:00+07:00`,RESEPSI_TITLE:`Resepsi`,RESEPSI_DAY:``,RESEPSI_DATE:``,RESEPSI_START:``,RESEPSI_END:``,RESEPSI_ISO_START:`2025-01-01T11:00:00+07:00`,RESEPSI_ISO_END:`2025-01-01T14:00:00+07:00`,HERO_IMAGE:``,HERO_CITY:``,MUSIC_URL:``,RSVP_MAX_GUESTS:`10`,BANK_ACCOUNTS:`[]`,LOVE_STORY:`[]`,GALLERY_IMAGES:`[]`,TEXT_SALAM_OPENING:``,TEXT_QUOTE_AR_RUM:``,TEXT_QUOTE_SOURCE:``,TEXT_INVITATION:``,TEXT_CLOSING:``,TEXT_SALAM_CLOSING:``,TEXT_SIGNATURE:``,TEXT_FAMILY:``,TEXT_GIFT_TITLE:``,TEXT_GIFT_DESC:``},h=null;function g(){let[e,t]=(0,f.useState)(h?h.data:null),[n,r]=(0,f.useState)(h?h.raw:m),[i,a]=(0,f.useState)(!h);return(0,f.useEffect)(()=>{h||fetch(`/api/config`).then(e=>e.json()).then(e=>{let n=p(e);h={data:n,raw:e},t(n),r(e),a(!1)}).catch(()=>{let e=p(m);t(e),a(!1)})},[]),{config:e,raw:n,loading:i}}function _(){h=null}export{l as a,o as c,r as d,u as i,a as l,g as n,c as o,d as r,s,_ as t,i as u};