import F from"./CkhvV11h.js";import{B as R,aO as T,d as P,aA as W,cd as z,a2 as A,az as m,ce as E,N as d}from"./DB-BdW1A.js";import{L as s,O as o,_ as b,R as H,j,I as g,S as v,a0 as M,U as _,a1 as U,k as $,P as p,V as y,u as i,M as N,W as I,H as L,Y}from"./DokyoHAC.js";const q={},G={class:"text-xs"};function J(r,c){return s(),o("span",G,[b("("),H(r.$slots,"default"),b(")")])}const K=R(q,[["render",J]]),Q={class:"relative inline-flex items-center justify-center"},X=j({__name:"BasketPopover",props:{cost:{type:Object,default:()=>({})},currency:{type:String,default:""},count:{type:[Number,String],default:void 0}},setup(r){return(c,l)=>{const h=T,k=K,u=P;return s(),o("div",Q,[g(u,{"data-test-id":"basket-link",to:{name:"basket"},class:"relative -mt-px flex items-center gap-1 no-underline",type:"normal"},{default:v(()=>[g(h,{class:"h-[17px] w-3.5"}),M(g(k,{class:"ml-1 mt-0.5 block lg:absolute lg:left-full"},{default:v(()=>[b(_(r.count),1)]),_:1},512),[[U,r.count]])]),_:1})])}}}),Z={class:"flex w-full flex-col items-center md:mx-auto md:w-auto md:flex-row"},tt={key:0},et={key:1},st={key:2},ot=["onClick"],rt=j({__name:"Toast",props:{notification:{}},setup(r){const c=r,l=W(),{close:h}=z(),{countWithoutSoldOutItems:k,data:u}=A(),f=$(()=>{var t;return(t=c.notification.actions.filter(e=>{var a;return typeof e.href=="string"||e.href instanceof String?e.href===l(m.basket.path):((a=e.href)==null?void 0:a.path)===l(m.basket.path)}))==null?void 0:t.length}),V=$(()=>{var t;return(t=c.notification.actions.filter(e=>{var a;return typeof e.href=="string"||e.href instanceof String?e.href===l(m.wishlist.path):((a=e.href)==null?void 0:a.path)===l(m.wishlist.path)}))==null?void 0:t.length}),S=()=>h(c.notification.id),x=(t,e)=>{e!=null&&e.onClick&&(t.preventDefault(),t.stopImmediatePropagation(),e==null||e.onClick({close:S}))};return E(S,c.notification.duration),(t,e)=>{var C,B;const a=F,D=X,O=P;return s(),o("div",{class:y(["flex w-full items-center justify-center p-4 shadow",{"bg-green-500":t.notification.status===("NotificationStatus"in t?t.NotificationStatus:i(d)).success,"bg-yellow-100":t.notification.status===("NotificationStatus"in t?t.NotificationStatus:i(d)).warn,"bg-red-100":t.notification.status===("NotificationStatus"in t?t.NotificationStatus:i(d)).error}])},[p("div",Z,[p("div",{class:y(["relative mx-auto mb-2.5 flex items-start md:m-0 md:mr-2",{"w-full pl-10 pr-6":f.value}])},[t.notification.status===("NotificationStatus"in t?t.NotificationStatus:i(d)).warn?(s(),N(a,{key:0,class:"mr-2 mt-1 h-4 w-4"})):I("",!0),p("span",{class:y({"mx-auto":f.value})},_(t.notification.message),3),f.value?(s(),N(D,{key:1,class:"mt-1 md:!static md:ml-2",currency:(C=i(u))==null?void 0:C.currencyCode,cost:(B=i(u))==null?void 0:B.cost,count:i(k)||0},null,8,["currency","cost","count"])):I("",!0)],2),(s(!0),o(L,null,Y(t.notification.actions,n=>(s(),o(L,null,[n.href?(s(),N(O,{key:`link-${n.text}`,class:"btn flex w-full md:mx-0 md:w-auto",to:n.href,onClick:w=>x(w,n)},{default:v(()=>[f.value?(s(),o("span",tt," Naar winkelmand ")):V.value?(s(),o("span",et," Naar verlanglijst ")):(s(),o("span",st,_(n.text),1))]),_:2},1032,["to","onClick"])):(s(),o("button",{key:n.text,type:"button",class:"btn flex w-full md:mx-0 md:w-auto",onClick:w=>x(w,n)},[p("span",null,_(n.text),1)],8,ot))],64))),256))])],2)}}});export{rt as _,X as a};