import type { DeepPartial } from "ts-essentials"

export const translations = {
  uploadStep: {
    title: "Upload File",
    manifestTitle: "Data that we expect:",
    manifestDescription: "(You will have a chance to rename or remove columns in next steps)",
    maxRecordsExceeded: (maxRecords: string) => `Too many records. Up to ${maxRecords} allowed`,
    dropzone: {
      title: "Drop any .xlsx, .xls or .csv file here or click to select",
      errorToastDescription: "upload rejected",
      activeDropzoneTitle: "Drop file here...",
      buttonTitle: "Select file",
      loadingTitle: "Processing...",
    },
    selectSheet: {
      title: "Select Which Sheet To Use",
      nextButtonTitle: "Next",
      backButtonTitle: "Back",
    },
  },
  selectHeaderStep: {
    title: "Select Header Row",
    nextButtonTitle: "Next",
    backButtonTitle: "Back",
  },
  matchColumnsStep: {
    title: "Match Columns",
    nextButtonTitle: "Next",
    backButtonTitle: "Back",
    userTableTitle: "Your table",
    templateTitle: "Will become",
    selectPlaceholder: "Select column...",
    ignoredColumnText: "Column ignored",
    subSelectPlaceholder: "Select...",
    matchDropdownTitle: "Match",
    unmatched: "Unmatched",
    duplicateColumnWarningTitle: "Another column unselected",
    duplicateColumnWarningDescription: "Columns cannot duplicate",
  },
  validationStep: {
    title: "Validate Data",
    nextButtonTitle: "Next",
    backButtonTitle: "Back",
    noRowsMessage: "No data found",
    noRowsMessageWhenFiltered: "No data containing errors",
    discardButtonTitle: "Delete selected rows",
    filterSwitchTitle: "Show only rows with errors",
  },
  imageUploadStep: {
    title: "Add Images",
    nextButtonTitle: "Submit",
    backButtonTitle: "Back",
  },
  alerts: {
    confirmClose: {
      headerTitle: "Exit import flow",
      bodyText: "Are you sure? Your current information will not be saved.",
      cancelButtonTitle: "Cancel",
      exitButtonTitle: "Exit flow",
    },
    submitIncomplete: {
      headerTitle: "Validation Issues",
      bodyText: "There are still some rows that contain errors. You can continue anyway, but rows with errors will be ignored when submitting.",
      bodyTextSubmitForbidden: "There are still some rows containing errors. Would you like to fix them or continue anyway?",
      cancelButtonTitle: "Go back",
      finishButtonTitle: "Continue anyway",
    },
    submitError: {
      title: "Error",
      defaultMessage: "An error occurred while submitting data",
    },
    unmatchedRequiredFields: {
      headerTitle: "Not all columns matched",
      bodyText: "There are required columns that are not matched or ignored. Do you want to continue?",
      listTitle: "Columns not matched:",
      cancelButtonTitle: "Cancel",
      continueButtonTitle: "Continue",
    },
    toast: {
      error: "Error",
    },
    validation: {
      title: "Validation Issues",
      description: "There are some validation issues that need to be addressed.",
    },
  },
}

export type TranslationsRSIProps = DeepPartial<typeof translations>
export type Translations = typeof translations
