import"./chunk-QTnfLwEv.js";import{n as e}from"./index-7yDgay5u.js";import{i as t,n,o as r,r as i,t as a}from"./jsx-runtime-DHSfUA5-.js";import{P as o,T as s}from"./test.id-DxQrYxPk.js";import{t as c}from"./navigationService-BNBSAd9W.js";import{n as l,t as u}from"./image-0EkgjX0N.js";import{t as d}from"./HeaderLayoutPage-CDZOzzod.js";import{t as f}from"./CellList-UkuVgkhN.js";import{t as p}from"./feature-DJ9luKsd.js";var m=n(`badge-check`,[[`path`,{d:`M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z`,key:`3c2336`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),h=n(`crown`,[[`path`,{d:`M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z`,key:`1vdc57`}],[`path`,{d:`M5 21h14`,key:`11awu3`}]]);r();var g=a();function _({account:n,purchaseActions:r,status:a}){let m=o(c),h=v(a.active),_=h.icon,y=[{description:e(`settings.membership.feature.chatBackgroundDesc`,`Set a chat background.`),icon:u,testId:s.featureChatBackground,title:e(`settings.membership.feature.chatBackground`,`Chat background`)},{description:e(`settings.membership.feature.timeMachineDesc`,`Send entries to the past or future.`),icon:l,testId:s.featureTimeMachine,title:e(`settings.membership.feature.timeMachine`,`Time machine`)}];return(0,g.jsxs)(d,{rootClassName:t.Page.GroupedRoot,contentClassName:t.Membership.PageContent,pageTestId:s.page,contentTestId:s.content,header:{title:h.pageTitle,showBack:!0},children:[(0,g.jsxs)(`section`,{className:t.Membership.HeroCard,children:[(0,g.jsx)(`div`,{className:i(t.Membership.HeroIcon,h.iconClassName),children:(0,g.jsx)(_,{"aria-hidden":`true`})}),(0,g.jsx)(`p`,{className:t.Membership.HeroTitle,"data-test-id":s.status,children:h.statusTitle}),(0,g.jsx)(`p`,{className:t.Membership.HeroDesc,children:h.description})]}),n,(0,g.jsx)(`div`,{className:t.Membership.FeatureSectionTitle,children:h.featureTitle}),(0,g.jsx)(`section`,{className:t.Membership.FeatureSection,children:y.map(e=>(0,g.jsx)(p,{active:a.active,...e},e.testId))}),(0,g.jsx)(f,{className:t.Membership.FutureMessagesGroup,items:[{label:e(`settings.membership.futureMessages`,`Future messages`),testId:s.futureMessagesEntry,onClick:()=>m.navigate({path:`/settings/membership/future-messages`})}]}),a.active?null:(0,g.jsx)(`div`,{className:t.Membership.PurchaseActions,children:r})]})}function v(n){return n?{description:e(`settings.membership.activatedDesc`,`Benefits are active.`),featureTitle:e(`settings.membership.unlockedFeatures`,`Unlocked`),icon:m,iconClassName:t.Membership.HeroIconActive,pageTitle:e(`settings.membership.center`,`Membership`),statusTitle:e(`settings.membership.activated`,`Membership activated`)}:{description:e(`settings.membership.purchaseDesc`,`One-time, lifetime access.`),featureTitle:e(`settings.membership.features`,`Benefits`),icon:h,iconClassName:t.Membership.HeroIconPurchase,pageTitle:e(`settings.membership.open`,`Get membership`),statusTitle:e(`settings.membership.open`,`Get membership`)}}export{_ as MembershipPageView};
//# sourceMappingURL=view-CTt677jt.js.map