1import{r as s,u as f,d as v,e as N,j as e,S as _,M as l,f as b}from"./index-BPR3l8qa.js";const y=t=>({store_name:t.settings.store_name,website:t.settings.website});function O(){const[t,d]=s.useState({}),{store_name:u,website:m}=f(y),[g,n]=s.useState(!1),i=v(),a=s.useMemo(()=>i.coupon,[i]),[r,x]=s.useState(null);s.useEffect(()=>{n(!0),N("/coupon_details?coupon="+a).then(j=>{n(!1),d(j)}).catch(()=>{x("NETWORK ERROR"),n(!1)})},[a]);const{discount_type:h,discount_value:c,affiliate_name:p}=t;if(g)return e.jsx("div",{className:"bg-light min-vh-100",children:e.jsx("div",{className:"text-center",style:{paddingTop:100},children:e.jsx(_,{size:"lg"})})});if(r)return e.jsx("div",{className:"bg-light min-vh-100",children:e.jsx("div",{className:"text-center",style:{paddingTop:100},children:e.jsx("p",{className:"alert alert-danger",children:r})})});const o=h==="percentage"?c+"%":e.jsx(b,{value:c});return e.jsx("div",{className:"bg-light min-vh-100",children:e.jsxs("div",{className:"row",style:{paddingTop:100},children:[e.jsx("div",{className:"col-lg-4"}),e.jsx("div",{className:"col-lg-4",children:e.jsx("div",{className:"card shadow-lg",children:e.jsx("div",{className:"card-body",children:e.jsxs("div",{className:"text-center",children:[e.jsx("img",{src:"/images/gift.svg",alt:"COUPON",className:"mb-2",width:"50%",height:"50%"}),e.jsx("h2",{children:e.jsx(l,{id:"discount_page_heading",defaultMessage:"Here is your {discount} OFF",values:{discount:o}})}),e.jsx("p",{className:"text-muted",children:e.jsx(l,{id:"discount_page_text",defaultMessage:"{affiliate_name} thinks you'll love {store_name}, so here's {discount} off!",values:{store_name:u,affiliate_name:p,discount:o}})}),e.jsx("input",{type:"text",className:"form-control form-control-lg mt-4 text-center text-uppercase",value:a}),e.jsx("a",{target:"_blank",rel:"noopener nofollow",href:"https://".concat(m,"/discount/").concat(a),className:"btn btn-primary btn-lg",style:{width:"100%"},children:e.jsx(l,{id:"SHOP NOW"})})]})})})}),e.jsx("div",{className:"col-lg-4"})]})})}export{O as default}; 2//# sourceMappingURL=CouponPage-oPMw8iGv.js.map
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.