import{e as m,b as d,o,r as n,n as p,Q as u,c as g,w as y,u as i,x as w}from"./vendor-1-1-30.js";import{a,s as f}from"./Loading-1-1-30.js";const l={type:{type:String,default:"button"},classList:{type:String,default:""},disabled:{type:Boolean,default:!1},link:{type:String,default:""},target:{type:String,default:"_self"}},h=["disabled","type"],_=["href","target"],c="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",b={__name:"BaseButton",props:l,setup(e){const r=e,s=m(()=>r.disabled?c+" !hover:bg-gray-300 !hover:text-gray-400 !bg-gray-300 !text-gray-400 cursor-not-allowed shadow":c);return(t,k)=>t.link===""?(o(),d("button",{key:0,disabled:t.disabled,type:t.type,class:p(`${s.value} ${t.classList}`)},[n(t.$slots,"default")],10,h)):(o(),d("a",{key:1,href:t.link,class:p(`${s.value} ${t.classList} ${t.disabled?"cursor-not-allowed	pointer-events-none":""}`),target:t.target},[n(t.$slots,"default")],10,_))}},v={__name:"PrimaryButton",props:l,setup(e){const r=u();return(s,t)=>(o(),g(b,{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 ${i(r).class?i(r).class:""}`},{default:y(()=>[n(s.$slots,"default")]),_:3},8,["link","disabled","target","type","class-list"]))}},B={__name:"SecondaryButton",props:l,setup(e){const r=u();return(s,t)=>(o(),g(b,{link:s.link,disabled:s.disabled,target:s.target,type:s.type,"class-list":`${s.disabled?"":"bg-white !border-primary-300 !text-primary-700 hover:bg-gray-50"} ${i(r).class?i(r).class:""}`},{default:y(()=>[n(s.$slots,"default")]),_:3},8,["link","disabled","target","type","class-list"]))}},A=w("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 a.post("index_resource",e),show:async e=>await a.post("show_resource",e),store:async e=>await a.post("store_resource",e),update:async e=>await a.post("update_resource",e),destroy:async e=>await a.post("destroy_resource",e)}}),C=w("ApiRequestStore",{state:()=>({apiKey:window.gcargo.api_key||""}),actions:{syncOptions:async()=>{const e=await a.post("sync_options");return f({message:"Ayarlar başarıyla senkronize edildi."}),e},fixAddress:async e=>await a.post("fix_address",{data:e}),createMpSeller:async e=>await a.post("create_mp_seller",{data:e})}});export{v as _,C as a,B as b,b as c,l as p,A as u};
