import{u as h}from"./index-BRMV7KFd.js";import{N as _,y,A as b,o as a,e as l,g as f,l as k,f as m,n as r,t as s,v as i,m as g,F as x}from"./vendor-CI5NvTnj.js";const v={key:0,class:"d-inline"},w={key:0,class:"d-inline"},O={key:0,class:"d-inline"},B=_({__name:"ButtonState",props:{state:{type:String,required:!0},addedClass:{type:String,default:""},customPadding:{type:String,default:""},iconButtonOnly:{type:Boolean,default:!1},product:{type:Object,required:!0},stretched:{type:Boolean,default:!0}},setup(n){const{t:o}=y(),{openModal:t}=h(),e=c=>{switch(c){case"only_for_club":return{label:o("mixit_club_only"),theme:"warning",themeText:"white",icon:"bird",type:"link",linkTo:"clubPath"};case"succeed":return{label:o("good_deeds_succeed"),theme:"info",icon:"heart-fill",type:"static",themeText:"white"};case"weather_too_hot":return{label:o("look_after"),theme:"info",icon:"frozen",type:"modal",modalOpen:"modal-watchdog",themeText:"white"};case"look_after":return{label:o("look_after"),theme:"primary",icon:"bird",type:"modal",modalOpen:"modal-watchdog",themeText:"light"};case"revive_me":return{label:o("revive_me"),theme:"cemetery",icon:"heart-fill",type:"modal",modalOpen:"modal-watchdog",themeText:"white"};case"hidden":case"removed":return{label:o("sale_closed"),theme:"primary",icon:"bird",type:"static",themeText:"light"};default:return{label:o("look_after"),theme:"primary",icon:"bird",type:"modal",modalOpen:"modal-watchdog",themeText:"light"}}};return(c,d)=>{const z=b("router-link");return a(),l(x,null,[e(n.state).type==="link"?(a(),f(z,{key:0,to:{name:e(n.state).linkTo},type:"button",class:r(["btn btn-gradient rounded-pill font-weight-medium text-white text-nowrap",[n.addedClass,`btn-${e(n.state).theme}`,n.customPadding?n.customPadding:"p-3 p-sm-2",{"stretched-link":n.stretched}]])},{default:k(()=>[m("i",{class:r([`mi-${e(n.state).icon} icon-20px`,{"mr-3 mr-sm-2":!n.iconButtonOnly}])},null,2),n.iconButtonOnly?i("",!0):(a(),l("span",v,s(e(n.state).label),1))]),_:1},8,["to","class"])):i("",!0),e(n.state).type==="static"?(a(),l("div",{key:1,class:r(["rounded-pill font-weight-medium text-nowrap text-center",[n.addedClass,`bg-${e(n.state).theme}`,`text-${e(n.state).themeText}`,n.customPadding?n.customPadding:"p-3 p-sm-2"]])},[m("i",{class:r([`mi-${e(n.state).icon} icon-20px`,{"mr-3 mr-sm-2":!n.iconButtonOnly}])},null,2),n.iconButtonOnly?i("",!0):(a(),l("span",w,s(e(n.state).label),1))],2)):i("",!0),e(n.state).type==="modal"?(a(),l("button",{key:2,type:"button",class:r(["btn btn-gradient rounded-pill font-weight-medium text-nowrap",[n.addedClass,`btn-${e(n.state).theme}`,`text-${e(n.state).themeText}`,n.customPadding?n.customPadding:"p-3 p-sm-2",{"stretched-link":n.stretched}]]),"aria-label":"Watchdog",onClick:d[0]||(d[0]=C=>g(t)({id:e(n.state).modalOpen,params:{product:n.product}}))},[m("i",{class:r([`mi-${e(n.state).icon} icon-20px`,{"mr-3 mr-sm-2":!n.iconButtonOnly}])},null,2),n.iconButtonOnly?i("",!0):(a(),l("span",O,s(e(n.state).label),1))],2)):i("",!0)],64)}}});function u(n){const o=n;o.__i18n=o.__i18n||[],o.__i18n.push({locale:"",resource:{cs:{good_deeds_succeed:t=>{const{normalize:e}=t;return e(["PodaĹ™ilo se"])},look_after:t=>{const{normalize:e}=t;return e(["PohlĂdat"])},mixit_club_only:t=>{const{normalize:e}=t;return e(["Mixit Klub"])},revive_me:t=>{const{normalize:e}=t;return e(["OĹľiv mÄ›"])},sale_closed:t=>{const{normalize:e}=t;return e(["Prodej ukonÄŤen"])}},sk:{good_deeds_succeed:t=>{const{normalize:e}=t;return e(["Podarilo sa"])},look_after:t=>{const{normalize:e}=t;return e(["PostrážiĹĄ"])},mixit_club_only:t=>{const{normalize:e}=t;return e(["Mixit Klub"])},revive_me:t=>{const{normalize:e}=t;return e(["OĹľiv ma"])},sale_closed:t=>{const{normalize:e}=t;return e(["Predaj ukonÄŤenĂ˝"])}},pl:{good_deeds_succeed:t=>{const{normalize:e}=t;return e(["UdaĹ‚o siÄ™"])},look_after:t=>{const{normalize:e}=t;return e(["Obserwuj"])},mixit_club_only:t=>{const{normalize:e}=t;return e(["Klub Mixit"])},revive_me:t=>{const{normalize:e}=t;return e(["OĹĽyw mnie"])},sale_closed:t=>{const{normalize:e}=t;return e(["SprzedaĹĽ zakoĹ„czona"])}},hu:{good_deeds_succeed:t=>{const{normalize:e}=t;return e(["Sikeres"])},look_after:t=>{const{normalize:e}=t;return e(["Figyelni"])},mixit_club_only:t=>{const{normalize:e}=t;return e(["Mixit klub"])},revive_me:t=>{const{normalize:e}=t;return e(["Élessz fel"])},sale_closed:t=>{const{normalize:e}=t;return e(["Eladás lezárva"])}},de:{good_deeds_succeed:t=>{const{normalize:e}=t;return e(["Es hat geklappt"])},look_after:t=>{const{normalize:e}=t;return e(["Siehe"])},mixit_club_only:t=>{const{normalize:e}=t;return e(["Mixit-Club"])},revive_me:t=>{const{normalize:e}=t;return e(["Wiederherstellen"])},sale_closed:t=>{const{normalize:e}=t;return e(["Verkauf beendet."])}},at:{good_deeds_succeed:t=>{const{normalize:e}=t;return e(["Es hat geklappt"])},look_after:t=>{const{normalize:e}=t;return e(["Siehe"])},mixit_club_only:t=>{const{normalize:e}=t;return e(["Mixit-Club"])},revive_me:t=>{const{normalize:e}=t;return e(["Wiederherstellen"])},sale_closed:t=>{const{normalize:e}=t;return e(["Verkauf beendet."])}},ro:{good_deeds_succeed:t=>{const{normalize:e}=t;return e(["Am reuČ™it"])},look_after:t=>{const{normalize:e}=t;return e(["NotificÄ"])},mixit_club_only:t=>{const{normalize:e}=t;return e(["Club Mixit"])},revive_me:t=>{const{normalize:e}=t;return e(["ĂŽnvie-mÄ"])},sale_closed:t=>{const{normalize:e}=t;return e(["Vânzare Ă®ncheiat"])}}}})}typeof u=="function"&&u(B);export{B as default};