import { defineStore } from 'pinia' import type { ICatalogState } from '@src/model'; import { IAccount, ICircuit, ICatalog, IGlobalState, IGroupShort, IMyCircuit, IMyGroup, IUserFields } from '@src/model' import { tools } from '@tools' import translate from '@src/globalroutines/util' import * as Types from '@src/store/Api/ApiTypes' import { useGlobalStore } from '@store/globalStore' import { serv_constants } from '@store/Modules/serv_constants' import { Api } from '@api' import { toolsext } from '@store/Modules/toolsext' import { static_data } from '@src/db/static_data' import { shared_consts } from '@src/common/shared_vuejs' import { costanti } from '@costanti' import globalroutines from '../globalroutines/index' export const useCatalogStore = defineStore('CatalogStore', { state: (): ICatalogState => ({ catalogs: [{ _id: '', idapp: '', title: '' }] }), getters: { getCatalogById: (state) => (id: string) => { return state.catalogs.find((cat: ICatalog) => cat._id === id); }, }, actions: { }, })