import{o as s,l as r,a as i,d as u,r as m,W as h,f as l,F as v,c as f,E as g,I as p,H as _,g as k,ag as w}from"./CO-Xmg5V.js";import{u as F}from"./CxQOo44Z.js";const I={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"};function b(n,t){return s(),r("svg",I,t[0]||(t[0]=[i("path",{fill:"var(--c-icon-fill)",stroke:"var(--c-icon-path)","stroke-linejoin":"round","stroke-miterlimit":"10","stroke-width":"1.5",d:"M16.3784 6C14.6757 6 13.2303 6.97297 12 8.91892 10.7697 6.97297 9.32432 6 7.62162 6 5.06903 6 3 8.06903 3 10.6216c0 3.1622 5.35135 7.2973 9 10.946 3.6486-3.6487 9-7.7838 9-10.946C21 8.06903 18.931 6 16.3784 6Z"},null,-1)]))}const T={render:b},C=["data-variant"],B=["name","checked"],V={class:"FavouriteToggle--fab"},W=["data-size"],S=u({__name:"FavouriteToggle",props:{variant:{default:"fab"},label:{default:"Favorite"},itemId:{},iconSize:{default:"24"}},setup(n){const t=n,a=m(!1),o=F();function c(e){a.value=e.target.checked,a.value?o.addToWishlist({itemId:t.itemId}):o.removeFromWishlist({itemId:t.itemId})}return h(o,e=>{a.value=e.isOnWishlist({itemId:t.itemId})},{immediate:!0}),(e,y)=>{const d=w;return s(),r("label",{class:"FavouriteToggle","data-variant":e.variant},[i("input",{class:"FavouriteToggle--input",type:"checkbox",name:e.itemId,checked:l(a),onChange:c},null,40,B),i("div",V,[i("div",{class:"FavouriteToggle--icon","data-icon":"heart","data-size":e.iconSize},[v(l(T))],8,W),e.label?(s(),f(d,{key:0,class:"FavouriteToggle--label"},{default:g(()=>[p(_(e.label),1)]),_:1})):k("",!0)])],8,C)}}});export{S as _};