export interface WidgetActionConfig {
  type: 'navigate' | 'open' | 'submit' | 'custom';
  target?: string;
  payload?: Record<string, unknown>;
}

export interface WidgetAnimationConfig {
  name?: string;
  duration?: string;
  delay?: string;
  timingFunction?: string;
}

export interface WidgetPermissionsConfig {
  requireAuthenticated?: boolean;
  roles?: string[];
  permissions?: string[];
}

export interface WidgetVisibilityConfig {
  desktop?: boolean;
  tablet?: boolean;
  mobile?: boolean;
}

export interface WidgetConfig {
  id: string;
  type: string;
  version: string;
  title?: string;
  subtitle?: string;
  order?: number;
  padding?: string;
  visibility?: WidgetVisibilityConfig;
  animation?: WidgetAnimationConfig;
  style?: Record<string, string>;
  permissions?: WidgetPermissionsConfig;
  props: Record<string, unknown>;
  actions?: Record<string, WidgetActionConfig>;
  featureFlag?: string;
  visible?: boolean;
}
