import{_ as r,d as i,Y as d,o as p,i as _,K as l}from"./app-DyK1k-lL.js";import{a as h}from"./apiAdmin-I34Xe3Oj.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};
