import{_ as z}from"./EventBrowserAlgolia.vue.CCykpdfn.js";import{_ as G}from"./Content.vue.DMTqvoyC.js";import{_ as J}from"./Card.vue.TrLfa8Cd.js";import{D as O}from"./datetime.lqzArHOP.js";import{d as B,s as o,t as c,w as e,C as k,F as g,D as P,y as a,H as S,A as E,V,z as r,x as f,G as l,B as W,a0 as j,e as q,a2 as Q,a3 as U,c as b,a4 as X,m as s,I as w,aK as T,ak as Y,al as Z,ae as tt,aL as et,v as at,aR as st}from"./entry.YecQDbUo.js";import{_ as ot}from"./index.vue.hVX2LEO7.js";import{_ as nt}from"./WasThisPageHelpful.vue.JkCWgdjG.js";import{_ as rt}from"./nuxt-layout.BiQQTQLU.js";import{u as lt,a as ct}from"./meta.DDAF9B9O.js";import{u as it}from"./meta-social.BbulAShe.js";import"./calendar.tj2EFrUs.js";import"./search.rPpoWRDt.js";import"./uniform.CQfK_2nv.js";import"./Headshot.vue.CAJxgiba.js";import"./util.Bx7Qs3b4.js";import"./Card.vue.PDMJXOPk.js";import"./VSelectionControl.Az8Hjjre.js";import"./VSheet.qsM7oXvh.js";import"./url.DB1u1Nwk.js";const ut=B({__name:"Members",props:{members:{}},setup(M){function _(p){return O.fromISO(p).toJSDate().toLocaleDateString()}return(p,$)=>(o(),c(j,{lines:"three"},{default:e(()=>[(o(!0),k(g,null,P(p.members,t=>(o(),k(g,null,[a(S),t?(o(),c(E,{key:0,class:"pa-3"},{default:e(()=>[t.category?(o(),c(V,{key:0,class:"text-overline"},{default:e(()=>[r(f(t.category),1)]),_:2},1024)):l("",!0),a(W,{class:"text-wrap"},{default:e(()=>[r(f(t.name),1)]),_:2},1024),a(V,{class:"text-wrap text-black"},{default:e(()=>[r(f(t.position),1)]),_:2},1024),t!=null&&t.start_date?(o(),c(V,{key:1,class:"text-caption mt-1"},{default:e(()=>[r(f(_(t.start_date))+" ",1),t.end_date?(o(),k(g,{key:0},[r(" - "+f(_(t.end_date)),1)],64)):l("",!0),t!=null&&t.reappointed?(o(),k(g,{key:1},[r(" * ")],64)):l("",!0)]),_:2},1024)):l("",!0)]),_:2},1024)):l("",!0)],64))),256))]),_:1}))}}),_t={key:0},dt=at("p",{class:"text-caption text-grey"},"* reappointed",-1),Bt=B({__name:"[slug]",async setup(M){var F;let _,p;const{params:$}=q(),{data:t}=([_,p]=Q(()=>X(`/api/contentstack/councils/${$.slug}`,"$klfEKbtfwC")),_=await _,p(),_);if(!t.value)throw U({statusCode:404,statusMessage:"Council Not Found!"});lt((F=t.value)==null?void 0:F.title),it(t.value),ct([{title:"Councils",href:"/councils"}]);const D=b(()=>{var n,i,d,u;return((u=(d=(i=(n=t.value)==null?void 0:n.contactConnection)==null?void 0:i.edges)==null?void 0:d[0])==null?void 0:u.node)??void 0}),h=b(()=>{var n,i,d;return((d=(i=(n=t.value)==null?void 0:n.eventsConnection)==null?void 0:i.edges)==null?void 0:d.map(u=>u==null?void 0:u.node))??[]}),N=b(()=>{var n;return((n=t.value)==null?void 0:n.default_calendar_view)||"year"});return(n,i)=>{const d=z,u=G,A=J,I=ut,H=ot,K=nt,R=rt;return o(),c(R,null,{default:e(()=>[s(t)?(o(),k("article",_t,[a(H,null,{sidebar:e(()=>{var v,y;return[s(D)?(o(),c(w,{key:0,class:"mb-5"},{default:e(()=>[a(T,null,{default:e(()=>[r(" Contact ")]),_:1}),a(S),a(A,{contact:s(D),flat:""},null,8,["contact"])]),_:1})):l("",!0),(y=(v=s(t))==null?void 0:v.members)!=null&&y.length?(o(),c(w,{key:1,class:"mb-5"},{default:e(()=>{var C,m,L;return[a(T,null,{default:e(()=>[r(" Members ")]),_:1}),a(I,{members:(C=s(t))==null?void 0:C.members},null,8,["members"]),a(S,{class:"mb-3"}),(L=(m=s(t))==null?void 0:m.members)!=null&&L.some(x=>x==null?void 0:x.reappointed)?(o(),c(Y,{key:0,class:"py-0"},{default:e(()=>[a(Z),dt]),_:1})):l("",!0)]}),_:1})):l("",!0)]}),default:e(()=>{var v,y,C;return[a(u,{"content-type":"council",system:(v=s(t))==null?void 0:v.system,"base-content":(y=s(t))==null?void 0:y.base},tt({default:e(()=>{var m;return[(m=s(h))!=null&&m.length?(o(),c(w,{key:0,class:"mb-5",id:"events"},{default:e(()=>[a(T,null,{default:e(()=>[r(" Events ")]),_:1}),a(S),a(d,{events:s(h),view:s(N),flat:""},null,8,["events","view"])]),_:1})):l("",!0)]}),_:2},[(C=s(h))!=null&&C.length?{name:"pre-rte",fn:e(()=>[a(w,{class:"py-2 mb-5",variant:"outlined",color:"primary",href:"#events",onClick:i[0]||(i[0]=et(m=>("useScrollTo"in n?n.useScrollTo:s(st))("events"),["prevent"]))},{default:e(()=>[a(E,{"prepend-icon":"fa-regular fa-calendar"},{default:e(()=>[a(V,{class:"font-weight-bold"},{default:e(()=>[r(" View "+f(s(t).title)+" Events ",1)]),_:1})]),_:1})]),_:1})]),key:"0"}:void 0]),1032,["system","base-content"])]}),_:1})])):l("",!0),a(K)]),_:1})}}});export{Bt as default};