import { defineStore } from 'pinia'; export interface TenantState { id: string | null; domain: string | null; label: string | null; } export const useTenantStore = defineStore('tenantStore', { state: () => ({ tenant: null as TenantState | null, }), actions: { init(tenant: Partial | null) { this.tenant = tenant ? { id: tenant.id ?? null, domain: tenant.domain ?? null, label: tenant.label ?? null, } : null; }, reset() { this.tenant = null; }, }, });