export type WidgetLayoutSupport = 'stack' | 'grid' | 'hero' | 'carousel' | 'split';

export type WidgetDataSourceName = 'featured' | 'latest' | 'category' | 'manual' | 'related' | 'future' | 'root' | 'parent';

export interface WidgetSettingsSchema {
  type: 'object';
  properties: Record<string, unknown>;
  required?: string[];
}

export interface WidgetMetadataSupport {
  title: boolean;
  subtitle: boolean;
  visibility: boolean;
  layout: boolean;
  animation: boolean;
  style: boolean;
  permissions: boolean;
}

export interface WidgetManifestEntry {
  type: string;
  version: string;
  componentKey: string;
  supportedLayouts: WidgetLayoutSupport[];
  supportedDataSources: WidgetDataSourceName[];
  settingsSchema: WidgetSettingsSchema;
  defaultSettings: Record<string, unknown>;
  metadataSupport?: WidgetMetadataSupport;
  enabled?: boolean;
}

export interface WidgetManifestFile {
  widgets: WidgetManifestEntry[];
}