1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8398],{83267:function(t,i,e){(window.__NEXT_P=window.__NEXT_P||[]).push(["/web/my/subscriptions",function(){return e(34123)}])},34123:function(t,i,e){"use strict";e.r(i),e.d(i,{default:function(){return b}});var r=e(52903),n=e(69692),d=e(30835),h=e(2784),p=e(85993),l=e(8641),s=e(63197),x=e(15446),o=e(26116),a=e(42289),Z=e(45745),c=e(5632),u=e(41478);let SubscriptionCardShimmer=()=>(0,r.BX)(s.Z,{direction:"column",alignItems:"flex-start",sx:{width:"100%",backgroundColor:(0,x.L)(""),borderRadius:"16px",marginBottom:"12px",border:"1px solid #F3F3F3",boxShadow:"0px 4px 16px rgba(34, 34, 34, 0.04)"},children:[(0,r.BX)(s.Z,{fullWidth:!0,sx:{padding:"0px 16px",paddingTop:"16px"},children:[(0,r.tZ)(n.Z,{sx:{marginBottom:"20px"},children:(0,r.tZ)(u.Z,{sx:{width:"60px",height:"48px"},variant:"rounded"})}),(0,r.BX)(s.Z,{direction:"column",alignItems:"flex-start",sx:{paddingLeft:"12px"},fullWidth:!0,children:[(0,r.tZ)(u.Z,{height:"18px",width:"60%"}),(0,r.BX)(s.Z,{fullWidth:!0,alignItems:"center",children:[(0,r.tZ)(n.Z,{mr:"4px",children:(0,r.tZ)(u.Z,{height:"14px",width:"60px"})}),(0,r.tZ)(u.Z,{height:"18px",width:"70px"})]}),(0,r.BX)(s.Z,{fullWidth:!0,alignItems:"center",children:[(0,r.tZ)(n.Z,{mr:"4px",children:(0,r.tZ)(u.Z,{height:"14px",width:"90px"})}),(0,r.tZ)(u.Z,{height:"18px",width:"70px"})]})]})]}),(0,r.tZ)(n.Z,{sx:{background:(0,x.L)("Gray -6"),borderTopRightRadius:"8px",borderBottomRightRadius:"8px",width:"106px",height:"20px",p:"4px 16px",mt:"8px"},children:(0,r.tZ)(u.Z,{height:"14px"})}),(0,r.BX)(n.Z,{sx:{width:"100%",padding:"0px 16px",mt:"16px"},children:[(0,r.tZ)(u.Z,{width:"150px",height:"18px"}),(0,r.tZ)(s.Z,{sx:{width:"100%",paddingTop:"8px"},alignItems:"flex-start",justifyContent:"flex-start",children:(0,r.BX)(s.Z,{justifyContent:"space-between",children:[(0,r.BX)(s.Z,{justifyContent:"flex-start",sx:{alignItems:"flex-start"},children:[(0,r.tZ)(n.Z,{sx:{marginRight:"8px"}}),(0,r.BX)(s.Z,{direction:"row",alignItems:"flex-start",children:[(0,r.tZ)(u.Z,{variant:"circular",height:"14px",width:"14px"}),(0,r.BX)(n.Z,{ml:"8px",children:[(0,r.tZ)(u.Z,{height:"14px",width:"60px"}),(0,r.tZ)(u.Z,{height:"18px",width:"80px"})]})]})]}),(0,r.tZ)(n.Z,{sx:{height:"30px",m:"0px 48px",borderRight:"1px solid ".concat((0,x.L)("Gray -5"))}}),(0,r.BX)(s.Z,{justifyContent:"flex-start",sx:{alignItems:"flex-start"},children:[(0,r.tZ)(n.Z,{sx:{marginRight:"8px"}}),(0,r.BX)(s.Z,{direction:"row",alignItems:"flex-start",children:[(0,r.tZ)(u.Z,{variant:"circular",height:"14px",width:"14px"}),(0,r.BX)(n.Z,{ml:"8px",children:[(0,r.tZ)(u.Z,{height:"14px",width:"60px"}),(0,r.tZ)(u.Z,{height:"18px",width:"80px"})]})]})]})]})}),(0,r.BX)(n.Z,{mt:"24px",children:[(0,r.tZ)(u.Z,{height:"14px",width:"50%"}),(0,r.tZ)(s.Z,{justifyContent:"flex-start",mt:"12px",children:[1,2].map(t=>(0,r.BX)(n.Z,{alignItems:"center",mr:"24px",children:[(0,r.tZ)(u.Z,{variant:"circular",height:"32px",width:"32px"}),(0,r.tZ)(u.Z,{height:"18px",width:"100px",sx:{ml:"4px",mt:"4px"}})]},t))})]}),(0,r.tZ)(n.Z,{sx:{marginBottom:"16px",marginTop:"10px"},children:(0,r.tZ)(u.Z,{width:"100px",height:"14px"})})]})]});var shimmer=()=>(0,r.BX)(n.Z,{width:"100%",children:[(0,r.tZ)(n.Z,{mb:"24px",children:(0,r.tZ)(u.Z,{height:"24px",width:"100px"})}),(0,r.tZ)(SubscriptionCardShimmer,{}),(0,r.tZ)(SubscriptionCardShimmer,{})]}),g=e(91909),m=e(86738),w=e(41457);let f=["TO_BE_FULFILLED","FULFILLMENT_IN_PROGRESS","CREATED"],MySubscriptionsPage=()=>{let[t,i]=(0,h.useState)([]),[e,a]=(0,h.useState)(Z.g.LOADING);(0,c.useRouter)();let[u,b]=(0,h.useState)({});async function getSubscriptions(){var t,e,r,n,d;try{a(Z.g.LOADING);let e=await p.A.getSubscriptions(),r=null===(t=e.data)||void 0===t?void 0:t.data;Array.isArray(null==r?void 0:r.subscriptions)&&(null==r?void 0:r.subscriptions.length)>0?(i(r.subscriptions),(0,w.Jh)("My Subscription Page Opened")):b({description:"Looks like you haven't placed any order yet"})}catch(t){console.error(t),b({description:null!==(d=null==t?void 0:null===(n=t.response)||void 0===n?void 0:null===(r=n.data)||void 0===r?void 0:null===(e=r.error)||void 0===e?void 0:e.message)&&void 0!==d?d:"Something went wrong"})}a(Z.g.COMPLETED)}return((0,h.useEffect)(()=>{getSubscriptions()},[]),u.description)?(0,r.tZ)(n.Z,{width:"630px",children:(0,r.tZ)(m.Z,{description:u.description})}):(0,r.BX)(s.Z,{children:[(0,r.tZ)(n.Z,{children:(0,r.tZ)(s.Z,{direction:"column",alignItems:"flex-start",sx:{width:"630px",height:"100%"},children:e==Z.g.LOADING?(0,r.tZ)(shimmer,{}):(0,r.BX)(n.Z,{sx:{width:"100%"},children:[(0,r.tZ)(g.x,{sx:{...(0,o.C2)("H14_Medium"),color:(0,x.L)("Gray 0"),margin:"0px 0 24px 0",fontFamily:"Recline"},children:"All Subscriptions"}),null==t?void 0:t.map(t=>f.includes(t.state)?null:(0,r.tZ)(d.Z,{subscription:t},t.displayId))]})})}),Array.isArray(t)&&t.length>0&&(0,r.tZ)(l.Z,{})]})};var b=MySubscriptionsPage;MySubscriptionsPage.getLayout=function(t){return(0,r.tZ)(a.Z,{loginRequired:!0,children:t})}}},function(t){t.O(0,[204,8742,5462,9774,2888,179],function(){return t(t.s=83267)}),_N_E=t.O()}]);
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.