import { ComputedRef, Ref, computed, ref } from 'vue'; import { Table } from './models'; const loading: Ref = ref(false); const tables: Ref = ref([]); const totalPerQuery: Ref = ref(0); const totalInDb: Ref = ref(0); const filterIds: Ref = ref([]); const selectedTable: Ref = ref(null); const copiedShortcode: Ref = ref(''); const apiKey: Ref = ref(''); const apiKeySaved: Ref = ref(false); const getUserId: ComputedRef = computed(() => { return window.userSettings?.uid; }); const isAdminPage: ComputedRef = computed(() => { const checkIfAdminPage = document.body.classList.contains('wp-admin'); if (checkIfAdminPage) { return true; } return false; }); export default { tables, totalPerQuery, totalInDb, filterIds, getUserId, loading, copiedShortcode, selectedTable, apiKey, apiKeySaved, isAdminPage, };