export interface DocumentSequenceInput {
  documentType: string;
  branchId?: string | null;
  organizationId?: string;
  period?: string;
}

export interface DocumentSequenceRecord {
  id: string;
  organizationId: string;
  branchId: string | null;
  documentType: string;
  prefix: string;
  period: string;
  currentNumber: number;
  paddingLength: number;
  isActive: boolean;
  createdAt: string;
  updatedAt: string;
}

export interface DocumentSequenceResult {
  code: string;
  documentType: string;
  branchId: string | null;
  currentNumber: number;
  nextNumber: number;
  period: string;
  prefix: string;
}

export interface DocumentSequenceListItem extends DocumentSequenceRecord {
  nextPreview: string;
}

export interface DocumentSequenceListResponse {
  success: boolean;
  time: string;
  message: string;
  items: DocumentSequenceListItem[];
}

export interface DocumentSequenceDetailResponse {
  success: boolean;
  time: string;
  message: string;
  sequence: DocumentSequenceRecord;
}

export interface DocumentSequencePreviewResponse {
  success: boolean;
  time: string;
  message: string;
  preview: DocumentSequenceResult;
}

export interface DocumentSequenceMutationPayload {
  documentType: string;
  prefix: string;
  period: string;
  branchId?: string | null;
  currentNumber?: number;
  paddingLength: number;
  isActive?: boolean;
}

export interface DocumentSequenceResetPayload {
  currentNumber: number;
}

export interface MutationSuccessResponse {
  success: boolean;
  message: string;
}
