/**
 * 바코드 라벨 백엔드 타입
 */

export interface BarcodeLabelComponent {
  id: string;
  type: "text" | "barcode" | "image" | "line" | "rectangle";
  x: number;
  y: number;
  width: number;
  height: number;
  zIndex: number;
  // text
  content?: string;
  fontSize?: number;
  fontColor?: string;
  fontWeight?: string;
  // barcode
  barcodeType?: string;
  barcodeValue?: string;
  showBarcodeText?: boolean;
  // image
  imageUrl?: string;
  objectFit?: string;
  // line/rectangle
  lineColor?: string;
  lineWidth?: number;
  backgroundColor?: string;
}

export interface BarcodeLabelLayout {
  width_mm: number;
  height_mm: number;
  components: BarcodeLabelComponent[];
}

export interface BarcodeLabelRow {
  label_id: string;
  label_name_kor: string;
  label_name_eng: string | null;
  description: string | null;
  width_mm: number;
  height_mm: number;
  layout_json: string | null;
  use_yn: string;
  created_at: string;
  created_by: string | null;
  updated_at: string | null;
  updated_by: string | null;
}

export interface BarcodeLabelTemplateRow {
  template_id: string;
  template_name_kor: string;
  template_name_eng: string | null;
  width_mm: number;
  height_mm: number;
  layout_json: string;
  sort_order: number;
  created_at: string;
}
