1import{g as V,_ as E,a as K}from"./CBzuctOS.js";import{_ as R}from"./Crmb4PeJ.js";import{_ as Y}from"./CCVu8Q98.js";import{f as F,r as h,i as Q,o as i,c,a as e,j as G,u as I,g as j,b as m,h as t,t as a,k as J,w as O,l as p,F as P,m as X,n as Z}from"./Dc0HNYrV.js";import"./DlAUqK2U.js";const ee={class:"p-2"},te=F({__name:"ModalWrapper",emits:["setShowModal"],setup(H,{emit:n}){const l=n,d=h(null),_=h(null);return Q(()=>{d.value.addEventListener("click",r=>{d.value.contains(r.target)&&!_.value.contains(r.target)&&l("setShowModal",!1)})}),(r,u)=>(i(),c("div",{ref_key:"modalScreen",ref:d,class:"fixed top-0 left-0 w-full h-full bg-black/60 flex justify-center items-center z-modal-backdrop sm:px-4"},[e("div",{ref_key:"modalContainer",ref:_,class:"sm:rounded sm:shadow bg-white z-modal max-h-screen w-full md:w-[700px]"},[e("div",ee,[e("button",{class:"text-clamp-4xl flex items-center justify-center ml-auto w-9 h-9 pt-1 text-gray-500 hover:text-gray-700 transition-all rounded-full hover:bg-gray-200",onClick:u[0]||(u[0]=s=>l("setShowModal",!1))}," Ã ")]),G(r.$slots,"default")],512)],512))}}),se={class:"layout-container"},oe={class:"lg:flex lg:gap-8"},ne={class:"lg:col-span-2 mb-6 lg:mb-0"},ae={class:"mx-auto max-w-64 lg:max-w-sm px-3 sticky top-4"},le=["src","alt"],ie={class:"lg:col-span-3 text-center lg:text-start"},re={class:"h2"},ce={class:"sub-heading text-accent my-3"},de=["innerHTML"],_e=["href"],ue={class:"btn"},me={class:"layout-container max-w-5xl mx-auto"},pe={class:"border border-zinc-200 rounded-lg mb-6 p-4 sm:p-6"},he={class:"px-4 pb-4"},fe={class:"text-clamp-3xl font-semibold mb-3"},ve={class:"flex justify-between items-center flex-wrap mb-6 sm:mb-12"},be={class:"h6 mr-3"},xe={key:1},we={class:"body"},ge={class:"divide-y divide-neutral-200"},ye={class:"py-6 first:pt-0"},ke={class:"mx-auto max-w-4xl"},Ce={class:"body"},Me=["innerHTML"],Se={class:"mt-6"},qe={key:0,class:"body font-semibold text-black mb-1"},B="reviews",Be=F({__name:"allies",async setup(H){let n,l;const d=Z(),{api_url:_,site_code:r,site_key:u}=d.public;I({title:"Allies"});const s=([n,l]=j(()=>V("book")),n=await n,l(),n),f=([n,l]=j(()=>V("reviews")),n=await n,l(),n),v=h(!1),b=x=>{v.value=x},U=K(B,_,r),T=[{name:"name",type:"text",placeholder:"Your name",required:!0,defaultValue:""},{name:"review",type:"textarea",placeholder:"Your review",rows:"4",required:!0,defaultValue:""}];return(x,w)=>{var g,y,k,C,M,S,q,$,L,N;const W=E,z=R,A=Y,D=te;return i(),c("div",null,[m(W,{quote:t(s).quote,heading:t(s).quote_title,subheading:t(s).quote_subtitle},null,8,["quote","heading","subheading"]),e("div",se,[e("div",oe,[e("div",ne,[e("div",ae,[e("img",{src:(g=t(s))==null?void 0:g.cover,alt:(y=t(s))==null?void 0:y.title,class:"rounded object-cover"},null,8,le)])]),e("div",ie,[e("h1",re,a((k=t(s))==null?void 0:k.title),1),e("p",ce,a((C=t(s))==null?void 0:C.pub_date),1),e("div",{class:"mt-6 body mx-auto",innerHTML:(M=t(s))==null?void 0:M.synopsis},null,8,de),e("div",null,[e("a",{href:(S=t(s))==null?void 0:S.retailer_url,target:"_blank",rel:"noreferrer"},[e("button",ue,a(((q=t(s))==null?void 0:q.retailer_button_text)||"Buy now"),1)],8,_e)])])])]),m(z,{heading:t(s).newsletter_heading,description:t(s).newsletter_text,"button-text":t(s).newsletter_button_text},null,8,["heading","description","button-text"]),e("div",me,[e("div",pe,[t(v)?(i(),J(D,{key:0,onSetShowModal:b},{default:O(()=>{var o;return[e("div",he,[e("h1",fe,a(((o=t(s))==null?void 0:o.review_button_text)||"Write a review"),1),m(A,{siteKey:t(u),apiUrl:t(U),defaultValues:T,collectionName:B},null,8,["siteKey","apiUrl"])])]}),_:1})):p("",!0),e("div",ve,[e("h3",be,a((($=t(s))==null?void 0:$.reviews_heading)||"Reviews"),1),e("button",{class:"btn",onClick:w[0]||(w[0]=o=>b(!0))},a(((L=t(s))==null?void 0:L.review_button_text)||"Write a review"),1)]),t(f).filter(o=>o.fields.approved).length===0?(i(),c("div",xe,[e("div",we,[e("p",null,a(((N=t(s))==null?void 0:N.reviews_empty_text)||"No reviews yet, be the first to write a review..."),1)])])):p("",!0),e("div",ge,[(i(!0),c(P,null,X(t(f).filter(o=>o.fields.approved),o=>(i(),c("section",ye,[e("figure",ke,[e("blockquote",Ce,[e("div",{innerHTML:o.fields.review},null,8,Me)]),e("div",Se,[o.fields.name?(i(),c("div",qe,a(o.fields.name),1)):p("",!0)])])]))),256))])])])])}}});
1export{Be 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.