import { AthenaRightKey } from '@xylex-group/athena/rights'; import { SettingsSurfaceReason } from './settings-surface-reason.js'; export type SettingsSurfaceAccess = "read" | "write" | "manage"; export type SettingsSurfaceAvailability = { state: "loading"; } | { access: SettingsSurfaceAccess; state: "ready"; } | { reason: SettingsSurfaceReason; state: "degraded"; } | { missingRights: readonly AthenaRightKey[]; reason: "missing_right"; state: "forbidden"; } | { reason: "capability_unavailable" | "provider_absent" | "provider_unavailable" | "runtime_absent" | "runtime_unavailable" | "transport_unresolved" | "unauthenticated"; state: "unavailable"; } | { reason: "client_unsupported" | "not_registered" | "runtime_unsupported"; state: "unsupported"; } | { error: unknown; reason?: "conflict" | "domain_error" | "policy_denied" | "transport_rejected"; state: "error"; };