// 展厅案例

import { defineStore } from "pinia";
import { ref, computed } from "vue";
import serviceAxios from "@/http/index";
import { } from "@/http/api/pages/Gallery/index";

export const useShowroomCaseStore = defineStore(
  "showroomCase",
  () => {
    const showroomCaseData = ref([]);

    const doubleCount = computed(() => { });

    /*
     * 获取展厅案例信息
     */
    const getShowroomCaseList = async (data) => {
      if (showroomCaseData.value.length === 0) {
        await setShowroomCaseData(data);
      }
      return showroomCaseData.value;
    };

    /*
     * 设置展厅案例信息
     */
    const setShowroomCaseData = async (data) => {
    };

    return {
      showroomCaseData,
      doubleCount,
      getShowroomCaseList,
      setShowroomCaseData,
    };
  },
  {
    // 持久化配置
    persist: true,
  }
);
