import { CursorPaginatedItem } from "hooks/usePagination";

export interface TemplateAddressDto {
  firstLine: string | null;
  secondLine: string | null;
  city: string | null;
  zipcode: string | null;
  country: string | null;
}

export interface TemplateDto {
  templateId: string;
  talentProfileId: string;
  createdBy: number;
  updatedBy: number;
  createdAt: number;
  updatedAt: number;
  name: string;
  templateJson: Record<string, unknown>;
  templateHtml: string;
  thumbnailUrl: string;
  address: TemplateAddressDto;
}
export type TemplateWithCursorDto = CursorPaginatedItem<TemplateDto>;

export interface TemplateResponse {
  template: TemplateDto;
}

export interface CampaignTemplateResponse {
  campaignTemplate: TemplateDto;
}

export interface TemplateSignedUrlResponse {
  url: string;
  signedUrl: string;
}

export interface TemplatesResponse {
  templates: TemplateDto[];
}
export interface TemplatesWithCursorResponse {
  templates: TemplateWithCursorDto[];
}

export interface CampaignTemplateResponse {
  campaignTemplate: TemplateDto;
}

export interface CampaignTemplateCreateDto {
  name: string;
  templateJson: any;
  thumbnailUrl: string;
  address: TemplateAddressDto;
  templateHtml: string;
}

export interface CampaignTemplate extends CampaignTemplateCreateDto {
  id: string;
}

export enum TemplateMenuOptions {
  Duplicate = "Duplicate",
  Edit = "Edit",
  Delete = "Delete",
}

export interface SelectOption<OptionType extends unknown = string> {
  label: string;
  value: OptionType;
  tooltip?: string;
}
