import{e as c,b as i,o,r as n,n as d,P as g,c as y,w,u as l,q as f}from"./vendor-1-1-38.js";import{a as r}from"./UiStore-1-1-38.js";const p={type:{type:String,default:"button"},classList:{type:String,default:""},disabled:{type:Boolean,default:!1},link:{type:String,default:""},target:{type:String,default:"_self"}},m=["disabled","type"],b=["href","target"],u="flex items-center justify-center px-4 py-2 border border-transparent rounded-md font-semibold text-white text-xs tracking-widest transition ease-in-out duration-150",h={__name:"BaseButton",props:p,setup(e){const a=e,s=c(()=>a.disabled?u+" !hover:bg-gray-300 !hover:text-gray-400 !bg-gray-300 !text-gray-400 cursor-not-allowed shadow":u);return(t,_)=>t.link===""?(o(),i("button",{key:0,disabled:t.disabled,type:t.type,class:d(`${s.value} ${t.classList}`)},[n(t.$slots,"default")],10,m)):(o(),i("a",{key:1,href:t.link,class:d(`${s.value} ${t.classList} ${t.disabled?"cursor-not-allowed	pointer-events-none":""}`),target:t.target},[n(t.$slots,"default")],10,b))}},S={__name:"PrimaryButton",props:p,setup(e){const a=g();return(s,t)=>(o(),y(h,{link:s.link,disabled:s.disabled,target:s.target,type:s.type,"class-list":`bg-primary-800 dark:bg-primary-800 text-white hover:text-white hover:bg-primary-700 focus:bg-primary-700 ${l(a).class?l(a).class:""}`},{default:w(()=>[n(s.$slots,"default")]),_:3},8,["link","disabled","target","type","class-list"]))}},v=f("ResourceStore",{state:()=>({shipment:{},returned:{},cargoIntegration:{},cargoIntegrations:window.gcargo.cargo_integrations||[],warehouses:window.gcargo.warehouses||[],shipments:window.gcargo.shipments||[],returneds:window.gcargo.returneds||[],productCategories:window.gcargo.product_categories||[],apiKey:window.gcargo.api_key||"",mpSellers:window.gcargo.mp_sellers||[]}),actions:{index:async e=>await r.post("index_resource",e),show:async e=>await r.post("show_resource",e),store:async e=>await r.post("store_resource",e),update:async e=>await r.post("update_resource",e),destroy:async e=>await r.post("destroy_resource",e)}});export{S as _,h as a,p,v as u};
