import { defineStore } from 'pinia';

export const useCloudQueryStore = defineStore({
  id: 'cloudquery',
  state: () => ({
    // 程序锁标识
    identification: false,
    // 云查询信息
    cloudqueryInfo: {},
    // 云查询结果展示
    cloudQueryModalInfo: {
      basicQuery:{
        landClassify:{},
        plowLandOccupy:{},
      },
      timeImages:{},
    },
  }),
  getters: {
    getCloudQueryInfo: (state) => {
      return state.cloudqueryInfo;
    },
    getIdentification: (state) => {
      return state.identification;
    },
    getCloudQueryModalInfo: (state) => {
      return state.cloudQueryModalInfo;
    }
  },
  actions: {
    setCloudQueryInfo(info: any) {
      this.cloudqueryInfo = info;
    },
    setIdentification(state: boolean) {
      this.identification = state;
    },
    setCloudQueryModalInfo(data: any){
      this.cloudQueryModalInfo = data;
    }
  },
});
