/**
 * Screenplay element types and interfaces
 * Industry-standard formatting (Final Draft compatible)
 */

export type ScreenplayElementType =
  | 'sceneHeading'
  | 'action'
  | 'character'
  | 'dialogue'
  | 'parenthetical'
  | 'transition'
  | 'note'
  | 'retained'
  | 'centered';

export type TemplateType = 'standard' | 'sitcom' | 'podcast';

export interface ScreenplayElement {
  id: string;
  type: ScreenplayElementType;
  content: string;
  page?: number;
  line?: number;
}

export interface TemplateConfig {
  name: TemplateType;
  label: string;
  pageWidth: number;
  pageHeight: number;
  topMargin: number;
  bottomMargin: number;
  leftMargin: number;
  rightMargin: number;
  fontSize: number;
  fontFamily: string;
  elementStyles: Record<ScreenplayElementType, ElementStyle>;
}

export interface ElementStyle {
  textAlign: 'left' | 'center' | 'right';
  uppercase: boolean;
  bold: boolean;
  indentStart: number;
  indentEnd: number;
  lineHeight: number;
  marginBottom: number;
}

export interface FormatResult {
  elements: ScreenplayElement[];
  template: TemplateType;
}

export interface DetectionResult {
  type: ScreenplayElementType;
  confidence: number;
  text: string;
}

export interface KeyboardShortcut {
  key: string;
  ctrl?: boolean;
  shift?: boolean;
  alt?: boolean;
  elementType: ScreenplayElementType;
  label: string;
}
