/** Per docs/backend/PHASE-9-TENANT-REGISTRY-DOMAINS-CONTRACT.md §1-2. */
export type MarketplaceLifecycleState =
  | 'draft' | 'configured' | 'content_ready' | 'domains_planned'
  | 'staging_live' | 'qa_passed' | 'production_ready' | 'live' | 'paused' | 'archived';

export interface Marketplace {
  id: string;
  name: string;
  code: string;
  type: 'commerce' | 'mall_directory' | 'hybrid' | 'single_brand';
  ownerId: string;
  countries: string[];
  currencies: string[];
  lifecycleState: MarketplaceLifecycleState;
}

export interface MarketplaceDomain {
  marketplaceId: string;
  domain: string;
  type: 'production' | 'www' | 'staging' | 'preview' | 'api' | 'seller';
  status: 'planned' | 'dns_pending' | 'ssl_pending' | 'active' | 'failed';
}

export interface LifecycleAdvanceResult {
  currentState: MarketplaceLifecycleState;
  nextState: MarketplaceLifecycleState | null;
  blockers: string[];
}
