import{r as s,h as i,H as t}from"./p-91e1cdd0.js";import{b as a,n as e,c as o,s as n}from"./p-2c9dd7c4.js";import{b as r}from"./p-bf086b51.js";import{b as p}from"./p-d14b00d9.js";import"./p-7062880e.js";import"./p-7ad92407.js";import"./p-f3effa5d.js";import"./p-ea120e31.js";import"./p-054d1471.js";import"./p-f63d9d89.js";const c=new class{async getViewPageState(){return r.getBenefitsAsync()}async getShopifyUrl(){return a((await r.getShopifyUrl()).redirectUrl)}},d=class{constructor(i){s(this,i),this.shopifyUrl=e,this.urlRefreshHandle=e}async componentWillLoad(){this.state=await c.getViewPageState()}async componentDidLoad(){this.shopifyUrl=await c.getShopifyUrl(),this.setupShopifyUrlRefresh(),await p.trackPageViewedAsync({pageId:"viewBenefits"})}disconnectedCallback(){o(this.urlRefreshHandle)&&window.clearInterval(this.urlRefreshHandle.value)}render(){return i(t,{class:"w-100 mb-4"},i("ap-ben-ui-container",{class:"mt-4 d-none"},i("div",{class:"row"},i("div",{class:"col-12"},i("ap-ben-hero-banner",{shopifyUrl:this.shopifyUrl}))),i("div",{class:"row"},i("div",{class:"col-12"},i("ap-ben-promoted-benefits",{benefits:this.state.promotedBenefits}))),i("div",{class:"row"},i("div",{class:"col-12"},i("ap-ben-benefits-list",{benefits:this.state.availableBenefits})))))}setupShopifyUrlRefresh(){this.urlRefreshHandle=n(window.setInterval((async()=>{this.shopifyUrl=await c.getShopifyUrl()}),12e4))}};export{d as ap_ben_benefits_page}