export type EmbedDisplayMode = 'inline' | 'popup' | 'modal';

export interface EmbedTheme {
  primaryColor?: string;
  borderRadius?: string;
}

export interface EmbedConfig {
  id: string;
  embedKey: string;
  eventTypeId: string;
  displayMode: EmbedDisplayMode;
  theme: EmbedTheme;
  allowedOrigins: string[];
  hideBranding: boolean;
  isActive: boolean;
  publicUrl: string;
  iframeUrl: string;
  htmlSnippet: string;
  scriptSnippet: string;
  snippet: string;
  scriptUrl: string;
  createdAt: string;
}

export interface EmbedConfigListResponse {
  data: EmbedConfig[];
}

export interface CreateEmbedConfigRequest {
  eventTypeId: string;
  displayMode: EmbedDisplayMode;
  theme?: EmbedTheme;
  allowedOrigins: string[];
  hideBranding?: boolean;
}

export interface UpdateEmbedConfigRequest extends Partial<CreateEmbedConfigRequest> {
  isActive?: boolean;
}

export interface UpdateEventTypeEmbedRequest {
  displayMode?: EmbedDisplayMode;
  theme?: EmbedTheme;
  allowedOrigins?: string[];
  hideBranding?: boolean;
}

export interface PublicEmbedConfig {
  embedKey: string;
  displayMode: EmbedDisplayMode;
  theme: EmbedTheme;
  publicUrl: string;
  iframeUrl: string;
  allowedPostMessageOrigins: string[];
}
