import{_ as r,x as i,b as d,o as p,f as _,N as l}from"./app-DGDivIsO.js";import{a as h}from"./apiAdmin-D4J8O5cP.js";const m=i({props:["x_warehouse_id","status"],emits:["success"],setup(s,{emit:t}){const{addEditRequestAdmin:a,loading:o}=h(),{t:n}=d();return{changeStatus:e=>{const u={warehouse_id:s.x_warehouse_id,status:e?1:0};a({url:"warehouses/update-online-store-status",data:u,successMessage:n("warehouse.online_store_status_updated"),success:g=>{t("success"),store.dispatch("auth/updateAllWarehouses")}})},loading:o}}});function f(s,t,a,o,n,c){const e=l;return p(),_(e,{checked:s.status==1,size:"small",onClick:s.changeStatus,loading:s.loading},null,8,["checked","onClick","loading"])}const S=r(m,[["render",f]]);export{S as O};
