1import{i as s,c as r}from"./vendor-CHCIo3bd.js";import{n,k as o,F as c,H as l,D as _}from"./app-B5OwpsGF.js";import"./vendor-filepond-C-Be2LEg.js";/* empty css */const d=["Nationwide"],v={name:"cabLocation",components:{Dropdown:_,icon:s,Header:l,Footer:c},props:{public:{type:Boolean,default:!1}},data(){return{page:null,regionOption:null,cabregions:[],pager:{},progress:!1}},computed:{regionOptions(){const a=[];for(const[,t]of Object.entries(this.page.regionOptions))d.includes(t)||a.push({text:t,value:t});return a},fetchBureaux(){return`/api/v1/bureau/bureaux?region=${this.regionOption}`},BureauCovidAlert(){return this.$cabSettings.Bureau.ShowCovidAlert}},mixins:[o],created(){this.init()},watch:{cabregions(){return this.cabregions.filter(a=>this.cabregions.region)},regionOption(){this.regions(this.fetchBureaux)}},methods:{init(){this.fetchData(),this.regions(this.fetchBureaux)},regions(a){this.progress=!0,this.$axios.get(a).then(t=>{this.cabregions=t.data.items,this.pager={total:t.data.total,pages:t.data.pages,current:t.data.current,next:t.data.next,back:t.data.back,end:t.data.end}}).catch(t=>{throw new Error("Failed to fetch region for this branch.",t)}).finally(()=>{this.progress=!1})},CovidPassportRequired(a){return a==1?"Yes":"No"},FaceToFaceService(a){return a==1?"Yes":"No"},YesNoIcon(a){return a==="Yes"?"check":"times"},statusStyle(a){return{"background-color":a.currently_active?"#008E50":"#ccc",height:"43px",width:"43px"}},paginateNext(a){a.next&&this.regions(a.next)},paginateBack(a){a.back&&this.regions(a.back)},isMobile(){return window.matchMedia("(max-width: 1199px)").matches},fetchCABLocations(){if(this.$route.query&&this.$route.query.stage){const t=this.$route.path.replace(/\/$/,"").split("/"),e=t[t.length-1];if(this.$route.query.stage==="Stage")return this.$axios.get(`/api/v1/${e}?stage=Stage`);if(this.$route.query.stage==="Live")return this.$axios.get(`/api/v1/${e}`)}const a=this.$route.path.replace(/^\/|\/$/g,"");return this.$axios.get(`/assets/data/pages/${a}.json`)},async fetchData(){try{const a=await this.fetchCABLocations();this.page=a.data,this.$route.hash&&setTimeout(()=>{const t=new r,e=document.querySelector(this.$route.hash);t.move(e)},1e3),this.$emit("updateHead")}catch(a){console.error(a),this.isError=!0}}}};var u=function(){var t=this,e=t._self._c;return t.page?e("div",{staticClass:"cab-locations"},[e("Header"),t._v(" "),e("div",{staticClass:"flex flex--start content-header container pb-0"},[e("div",{staticClass:"column column-100 flex flex--column flex--end typography"},[e("div",{staticClass:"px-3 pb-3"},[e("div",{staticClass:"page__breadcrumbs hidden-print"},[e("ul",{staticClass:"unstyled"},[e("li",[e("a",{attrs:{href:"/",title:"Home"}},[t._v(` 2 Home 3 `)]),t._v(" "),e("icon",{attrs:{name:"caret-right"}})],1),t._v(" "),t._m(0)])]),t._v(" "),e("h1",{staticClass:"h1 font-avenir-medium mt-3 mb-1",domProps:{innerHTML:t._s(t.page.Title)}})])])]),t._v(" "),e("div",{staticClass:"flex flex--start container pt-0"},[e("div",{staticClass:"column-100"},[e("div",{staticClass:"bg--white p-3"},[e("div",{staticClass:"mr-lg-10",domProps:{innerHTML:t._s(t.page.Content)}})]),t._v(" "),e("div",{staticClass:"flex flex--start hidden-print bg--white mt-3 py-3 px-2"},[e("div",{staticClass:"column column-40"},[e("div",{staticClass:"flex flex--start group-filter"},[e("Dropdown",{key:t.regionOption,staticClass:"column-80 m-0",attrs:{placeholder:"Select a Region",multiple:!1,options:t.regionOptions,validate:!1,searchable:!0},model:{value:t.regionOption,callback:function(i){t.regionOption=i},expression:"regionOption"}}),t._v(" "),e("a",{directives:[{name:"show",rawName:"v-show",value:t.regionOption,expression:"regionOption"}],staticClass:"column-20 p-0 pt-2 pl-md-2 pt-md-3",attrs:{href:"#"},on:{click:function(i){i.preventDefault(),t.regionOption=null}}},[t._v(` 4 Clear 5 `)])],1)])]),t._v(" "),t.cabregions.length&&!t.progress?e("div",{staticClass:"bg--white mt-3 dashboard-list dashboard-list--generic"},[e("ul",{staticClass:"dashboard-list__list dashboard-list--generic-list no-list-style"},[e("li",{staticClass:"d-none d-xl-block"},[e("div",{staticClass:"dashboard-list__row dashboard-list__row--header read-only"},[e("div",{staticClass:"dashboard-list__item list__item--generic-150"},[t._v("Name")]),t._v(" "),e("div",{staticClass:"dashboard-list__item list__item--generic-150"},[t._v("Opening hours")]),t._v(" "),e("div",{staticClass:"dashboard-list__item list__item--generic-150"},[t._v("Phone number")]),t._v(" "),t.BureauCovidAlert===1?e("div",{staticClass:"dashboard-list__item list__item--generic-150"},[t._v(` 6 Face to face service 7 `)]):t._e(),t._v(" "),t.BureauCovidAlert===1?e("div",{staticClass:"dashboard-list__item list__item--generic-150"},[t._v(` 8 Vaccine Pass required 9 `)]):t._e(),t._v(" "),e("div",{staticClass:"dashboard-list__item list__item--generic-150"},[t._v("Full details of CAB")])])]),t._v(" "),t._l(t.cabregions,function(i){return e("li",{key:i.id},[e("div",{staticClass:"dashboard-list__row read-only"},[e("div",{staticClass:"dashboard-list__item list__item--generic-150"},[t._v(` 10 `+t._s(i.Title)+` 11 `)]),t._v(" "),e("div",{staticClass:"dashboard-list__item list__item--generic-150",domProps:{innerHTML:t._s(t.$options.filters.nl2br(i.OpeningHours))}}),t._v(" "),e("div",{staticClass:"dashboard-list__item list__item--generic-150"},[t._v(` 12 `+t._s(i.PhoneNumber)+` 13 `)]),t._v(" "),t.isMobile()&&t.BureauCovidAlert===1?e("div",[e("div",{staticClass:"dashboard-list__item list__item--generic-200"},[e("strong",[t._v("Face to face service available:")]),t._v(" "),e("icon",{attrs:{name:t.YesNoIcon(t.FaceToFaceService(i.FaceToFaceService))}}
13)],1)]):t._e(),t._v(" "),!t.isMobile()&&t.BureauCovidAlert===1?e("div",[e("div",{staticClass:"dashboard-list__item list__item--generic-150"},[e("icon",{attrs:{name:t.YesNoIcon(t.FaceToFaceService(i.FaceToFaceService))}})],1)]):t._e(),t._v(" "),t.isMobile()&&t.BureauCovidAlert===1?e("div",[e("div",{staticClass:"dashboard-list__item list__item--generic-200"},[e("strong",[t._v("Vaccine Pass required:")]),t._v(" "),e("icon",{attrs:{name:t.YesNoIcon(t.CovidPassportRequired(i.CovidPassportRequired))}})],1)]):t._e(),t._v(" "),!t.isMobile()&&t.BureauCovidAlert===1?e("div",[e("div",{staticClass:"dashboard-list__item list__item--generic-150"},[e("icon",{attrs:{name:t.YesNoIcon(t.CovidPassportRequired(i.CovidPassportRequired))}})],1)]):t._e(),t._v(" "),e("router-link",{staticClass:"dashboard-list__item list__item--generic-150",attrs:{to:{name:"cab",params:{name:i.URLSegment}}}},[t._v(` 14 `+t._s(i.URLSegment)+` 15 `)])],1)])})],2)]):t._e(),t._v(" "),t.cabregions.length>1?e("div",{staticClass:"dashboard__inbox-list__pagination dashboard-list__pagination"},[t.pager.current>1?e("a",{staticClass:"dashboard-list__pagination__prev",attrs:{href:t.pager.back},on:{click:function(i){return i.preventDefault(),t.paginateBack(t.pager)}}},[e("icon",{attrs:{name:"cabicons-arrow-left"}}),t._v(" "),e("span",[t._v("Previous")])],1):e("div",{staticClass:"dashboard-list__pagination__prev dashboard-list__pagination__prev--disabled"},[e("icon",{attrs:{name:"cabicons-arrow-left"}})],1),t._v(" "),e("div",{staticClass:"dashboard-list__pagination__page"},[t._v(` 16 `+t._s(t.pager.current)+" - "+t._s(t.pager.end)+" of "+t._s(t.pager.total)+` 17 `)]),t._v(" "),t.pager.end<t.pager.total?e("a",{staticClass:"dashboard-list__pagination__next",attrs:{href:t.pager.next},on:{click:function(i){return i.preventDefault(),t.paginateNext(t.pager)}}},[e("span",[t._v("Next")]),t._v(" "),e("icon",{attrs:{name:"cabicons-arrow-right"}})],1):e("div",{staticClass:"dashboard-list__pagination__next dashboard-list__pagination__next--disabled"},[e("icon",{attrs:{name:"cabicons-arrow-right"}})],1)]):t._e(),t._v(" "),t.pager.total==0?e("div",{staticClass:"m-5 text-center text--gray"},[t._v(` 18 There are no records matches your filter. 19 `)]):t._e(),t._v(" "),t.progress?e("div",{staticClass:"m-5 text-center text--gray"},[e("icon",{attrs:{name:"spinner",scale:"4",pulse:""}})],1):t._e()])]),t._v(" "),e("Footer")],1):t._e()},h=[function(){var a=this,t=a._self._c;return t("li",[t("span",[a._v("CAB Locations")])])}],p=n(v,u,h,!1,null,null);const C=p.exports;export{C 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.