1import k from"./Du9UN61w.js";import j from"./WrGdc-FC.js";import{c as d,o as s,d as e,h as u,w as L,t as m,Q as D,z as p,v as T,e as x,p as f,f as b,g as r,r as N,_ as q,F as g,q as h,j as y,u as M,l as F,m as V,n as B,a as I,s as A}from"./K1b_ijTh.js";import{_ as H}from"./BrT219pD.js";import{h as z}from"./XUID70n1.js";import"./Cd6vnrSW.js";import"./CQoHp_LM.js";import"./F-cZlZ27.js";const P={class:"mb-full"},Q={class:"text-xl font-bold mb-2"},E=["innerHTML"],G={class:"pl-2 text-xs md:text-md lg:text-lg font-bold leading-6"},O={class:"flex flex-1 items-center justify-center tracking-[4px] font-semibold font-mono text-sm lg:text-xl"},R={class:"flex p-2 mt-2 items-stretch justify-between"},S={class:"flex items-center justify-center text-black font-semibold text-xs px-4 py-2 rounded-lg"},J={__name:"DiscountCodesListItem",props:{code:Object},setup(t){const c=t,l=N(!1),_=()=>{navigator.clipboard.writeText(c.code.code).then(()=>{l.value=!0,setTimeout(()=>{l.value=!1},2e3)})};return(o,a)=>{const n=T,i=q;return s(),d("li",{class:p(["flex flex-wrap items-center justify-between gap-x-6 gap-y-4 sm:flex-nowrap bg-neutral-200/50 rounded-lg py-6 px-8 md:px-10 my-3 relative",{"bg-gradient-to-br from-primary-light to-primary-lighter":t.code.promoted}])},[a[0]||(a[0]=e("div",{class:"absolute left-0 top-1/2 transform -translate-y-1/2 -ml-4 w-8 h-8 bg-white rounded-full"},null,-1)),a[1]||(a[1]=e("div",{class:"absolute right-0 top-1/2 transform -translate-y-1/2 -mr-4 w-8 h-8 bg-white rounded-full"},null,-1)),u(i,{class:p(["flex flex-col flex-grow justify-between items-center",{"md:flex-row":!t.code.promoted}]),to:t.code.url},{default:L(()=>[e("div",P,[e("p",Q,m(t.code.name),1),e("div",{class:"text-xs md:mr-4 line-clamp-3",innerHTML:t.code.description},null,8,E)]),e("div",{class:"my-4 w-full max-w-96 ml-auto mr-6 flex flex-row justify-center items-center bg-white rounded-lg overflow-hidden text-center",onClick:D(_,["prevent"])},[e("div",{class:p(["p-2 lg:p-4 mr-auto flex items-center justify-center bg-neutral-100/70",{"bg-primary":t.code.promoted}])},[u(n,{name:"heroicons:gift",class:"h-5 w-5 lg:h-6 lg:w-6","aria-hidden":"true"}),e("span",G,m(t.code.amount_discount>0?o.$n(Number(t.code.amount_discount),"currency"):Number(t.code.percent_discount)+"%"),1)],2),e("p",O,[x(m(r(l)?"Code copied":t.code.code)+" ",1),r(l)?b("",!0):(s(),f(n,{key:0,name:"heroicons:clipboard-document-list",class:"ml-2 h-5 w-5 lg:h-5 lg:w-5","aria-hidden":"true"}))])]),e("div",R,[e("button",S,[x(m(o.$t("global.More"))+" ",1),u(n,{name:"heroicons:arrow-long-right",class:"ml-2 w-4 h-4"})])])]),_:1},8,["class","to"])],2)}}},K={role:"list",class:"grid grid-cols-1 md:grid-cols-2 gap-4"},U={role:"list",class:"py-6"},W={__name:"DiscountCodesList",props:{codes:{type:Array,default:()=>[]}},setup(t){const c=t,l=y(()=>c.codes.filter(o=>o.promoted)),_=y(()=>c.codes.filter(o=>!o.promoted));return(o,a)=>{const n=J;return s(),d("div",null,[e("ul",K,[(s(!0),d(g,null,h(r(l),i=>(s(),f(n,{key:i.id,code:i},null,8,["code"]))),128))]),e("ul",U,[(s(!0),d(g,null,h(r(_),i=>(s(),f(n,{key:i.id,code:i},null,8,["code"]))),128))])])}}},X={class:"container my-20 min-h-[100vh]"},Y={key:1},Z={class:"overflow-hidden"},ee={class:"py-5 border-t border-neutral-200 mt-5"},te={key:0,class:"flex flex-col gap-y-4 mt-7 pt-5"},oe={class:"text-2xl font-bold mb-3"},me={__name:"index",async setup(t){let c,l;const{t:_}=M(),{data:o,pending:a}=([c,l]=F(()=>A("/discount_code")),c=await c,l(),c);return V(async()=>{await B(),z("page_view")}),I({title:`${_("global.Discount_codes")}`}),(n,i)=>{const w=k,v=j,$=W,C=H;return s(),d("div",X,[r(a)?(s(),f(w,{key:0})):(s(),d("div",Y,[u(v,{title:n.$t("global.Discount_codes")},null,8,["title"]),e("div",Z,[u($,{codes:r(o)?.discount_code_groups},null,8,["codes"])]),e("div",ee,[r(o)?.faq?(s(),d("div",te,[e("h2",oe,m(n.$t("global.Discount_codes"))+" - "+m(n.$t("faq.Frequently_asked_questions")),1),u(C,{content:r(o)?.faq},null,8,["content"])])):b("",!0)])]))])}}};export{me 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.