import request from "@/utils/request";
import { Account_BaseUrl } from "@/api/config";
const baseURL = Account_BaseUrl + "/admin/shop/branch";

const ShopBranchApi = {
  getList(params: any) {
    return request<any>({
      url: `${baseURL}/page`,
      method: "get",
      params
    });
  },
  getDataSync(params: any) {
    return request<any>({
      url: `${baseURL}/get/dataSyncMethod`,
      method: "get",
      params
    });
  },
  setDataSync(id: any) {
    return request<any>({
      url: `${baseURL}/setting/dataSyncMethod?dataSyncMethod=${id}`,
      method: "post",
    });
  },
  dataSync(id: any) {
    return request<any>({
      url: `${baseURL}/data/sync/enable?branchShopId=${id}`,
      method: "post",
    });
  },
  enable(id: any) {
    return request<any>({
      url: `${baseURL}/account/enable?branchShopId=${id}`,
      method: "post",
    });
  },
  disable(id: any) {
    return request<any>({
      url: `${baseURL}/account/disable?branchShopId=${id}`,
      method: "post",
    });
  },
};


export interface Responseres {
  code?: number | null;
  data?: any;
  msg?: null | string;
  [property: string]: any;
}

export default ShopBranchApi;
