import { ref } from 'vue' import { defineStore } from 'pinia' export const useSettingsStore = defineStore('settingsStore', () => { /** * Stores the loading status for the settings form. * Used to persist loading status when switching between tabs. */ const isLoading = ref(false); /** * Stores the show popup status for the settings form. * Used to persist show popup status when switching between tabs. */ const showPopup = ref(false); /** * Stores the popup title for the settings form. * Used to persist popup title when switching between tabs. */ const popupTitle = ref(''); /** * Stores the selected condition key for the settings form. * Used to persist selected condition key when switching between tabs. */ const selectedConditionKey = ref(''); /** * Stores the selected condition value for the settings form. * Used to persist selected condition value when switching between tabs. */ const selectedConditionValue = ref(''); /** * Stores the component upgrade status for the settings form. * Used to persist component upgrade status when switching between tabs. */ const componentUpgrade = ref('upgrade_suffix'); /** * Stores the external links for the settings form. * Used to persist external links when switching between tabs. */ const externalLinks = ref([]); /** * Stores the edited row key for the settings form. * Used to persist edited row key when switching between tabs. */ const editedRowKey = ref(null); /** * Stores the open drawer status for the settings form. * Used to persist open drawer status when switching between tabs. */ const openDrawer = ref(false); /** * Stores the inline mapping edit status for the settings form. * Used to persist inline mapping edit status when switching between tabs. */ const inlineMappingEdit = ref(true); /** * Stores the dynamic options for the settings form. * Used to persist dynamic options when switching between tabs. */ const dynamicOptions = ref([]); /** * Stores the group data for the settings form. * Used to persist group data when switching between tabs. */ const groupData = ref([]); /** * Stores the current input values from settings form fields. * Used to persist field values when switching between tabs. */ const inputValues = ref({}); return { isLoading, showPopup, popupTitle, selectedConditionKey, selectedConditionValue, componentUpgrade, externalLinks, editedRowKey, openDrawer, inlineMappingEdit, dynamicOptions, groupData, inputValues, } });