/**
 * en.js - English locale (canonical reference)
 * All other locales deep-merge against this to fill missing keys.
 */

/** @type {import('../../../types/index.js').AsnLocale} */
export const en = {
  toolbar: {
    bold: 'Bold (Ctrl+B)',
    italic: 'Italic (Ctrl+I)',
    underline: 'Underline (Ctrl+U)',
    strikethrough: 'Strikethrough',
    superscript: 'Superscript',
    subscript: 'Subscript',
    alignLeft: 'Align Left',
    alignCenter: 'Align Center',
    alignRight: 'Align Right',
    alignJustify: 'Justify',
    ul: 'Unordered List',
    ol: 'Ordered List',
    checklist: 'Checklist',
    indent: 'Indent',
    outdent: 'Outdent',
    undo: 'Undo (Ctrl+Z)',
    redo: 'Redo (Ctrl+Y)',
    hr: 'Horizontal Rule',
    link: 'Insert Link',
    image: 'Insert Image',
    video: 'Insert Video',
    emoji: 'Insert Emoji',
    icon: 'Insert FA Icon',
    table: 'Insert Table',
    fontSize: 'Font Size',
    fontSizePlaceholder: 'Size',
    removeFormat: 'Remove Format',
    direction: 'Toggle Text Direction (LTR / RTL)',
    fontFamily: 'Font Family',
    paragraphStyle: 'Paragraph Style',
    paragraphStylePlaceholder: 'Style',
    lineHeight: 'Line Height',
    lineHeightPlaceholder: '\u2195 Line',
    codeview: 'HTML Code View',
    fullscreen: 'Fullscreen',
    shortcuts: 'Keyboard Shortcuts (Ctrl+Shift+/)',
    find: 'Find (Ctrl+F)',
    findReplace: 'Find & Replace (Ctrl+H)',
    inlineCode: 'Inline Code (Ctrl+`)',
    print: 'Print',
    foreColor: 'Text Color',
    backColor: 'Highlight Color',
    chooseTextColor: 'Choose text color',
    chooseHighlightColor: 'Choose highlight color',
    customColor: 'Custom color',
    insertTableLabel: 'Insert Table',
    /** Map of paragraph-style value → label (only values needing translation) */
    paragraphItems: {
      p:          'Normal',
      blockquote: 'Quote',
      pre:        'Code',
    },
  },

  linkDialog: {
    ariaLabel:    'Insert link',
    title:        'Insert Link',
    url:          'URL',
    urlPlaceholder:  'https://',
    displayText:  'Display Text',
    textPlaceholder: 'Link text',
    openInNewTab: 'Open in new tab',
    insertBtn:    'Insert',
    cancelBtn:    'Cancel',
  },

  imageDialog: {
    ariaLabel:      'Insert image',
    title:          'Insert Image',
    imageUrl:       'Image URL',
    urlPlaceholder: 'https://example.com/image.png',
    altText:        'Alt Text',
    altPlaceholder: 'Describe the image',
    alignment:      'Alignment',
    alignNone:      'None',
    alignLeft:      'Left',
    alignCenter:    'Center',
    alignRight:     'Right',
    uploadLabel:    'Or upload a file',
    insertBtn:      'Insert',
    cancelBtn:      'Cancel',
  },

  videoDialog: {
    ariaLabel:      'Insert video',
    title:          'Insert Video',
    videoUrl:       'Video URL',
    urlPlaceholder: 'YouTube, Vimeo, or direct .mp4 URL',
    widthLabel:     'Width (px)',
    widthPlaceholder: '560',
    insertBtn:      'Insert',
    cancelBtn:      'Cancel',
    /** @param {string} type */
    detected:       (type) => `Detected: ${type}`,
    unknownFormat:  'Unknown format \u2014 will try direct video embed',
    invalidUrl:     'Invalid URL \u2014 please enter a valid video link.',
  },

  emojiDialog: {
    ariaLabel:         'Insert emoji',
    title:             'Insert Emoji',
    searchPlaceholder: 'Search emojis\u2026',
    all:               'All',
    cancelBtn:         'Cancel',
    close:             'Close',
    categories: {
      smileys: 'Smileys',
      people:  'People',
      animals: 'Animals',
      food:    'Food',
      travel:  'Travel',
      objects: 'Objects',
      symbols: 'Symbols',
    },
  },

  iconDialog: {
    ariaLabel:         'Insert FA icon',
    title:             'Insert FA Icon',
    searchPlaceholder: 'Search icons\u2026',
    all:               'All',
    style:             'Style',
    size:              'Size',
    color:             'Color',
    useColor:          ' Use color',
    selectHint:        'Select an icon',
    insertBtn:         'Insert FA Icon',
    cancelBtn:         'Cancel',
    close:             'Close',
    categories: {
      popular:       'Popular',
      interface:     'Interface',
      navigation:    'Navigation',
      media:         'Media',
      communication: 'Communication',
      files:         'Files',
      people:        'People',
      objects:       'Objects',
    },
  },

  findReplace: {
    findTitle:        'Find',
    findReplaceTitle: 'Find & Replace',
    findPlaceholder:  'Find\u2026',
    searchAriaLabel:  'Search text',
    caseSensitive:    '\u00a0Case sensitive',
    prevBtn:          '\u2190 Prev',
    nextBtn:          'Next \u2192',
    replacePlaceholder: 'Replace with\u2026',
    replaceAriaLabel:   'Replace with',
    replaceBtn:         'Replace',
    replaceAllBtn:      'Replace All',
    close:              '\u00d7',
  },

  shortcutsDialog: {
    title:     'Keyboard Shortcuts',
    ariaLabel: 'Keyboard Shortcuts',
    close:     'Close',
    shortcuts: [
      {
        category: 'Text Formatting',
        items: [
          { keys: 'Ctrl + B',  action: 'Bold' },
          { keys: 'Ctrl + I',  action: 'Italic' },
          { keys: 'Ctrl + U',  action: 'Underline' },
          { keys: 'Ctrl + K',  action: 'Insert / edit link' },
        ],
      },
      {
        category: 'History',
        items: [
          { keys: 'Ctrl + Z',                      action: 'Undo' },
          { keys: 'Ctrl + Y  /  Ctrl + Shift + Z', action: 'Redo' },
        ],
      },
      {
        category: 'Selection & Navigation',
        items: [
          { keys: 'Ctrl + A',    action: 'Select all content' },
          { keys: 'Tab',         action: 'Indent list item / insert spaces' },
          { keys: 'Shift + Tab', action: 'Outdent list item' },
        ],
      },
      {
        category: 'Clipboard',
        items: [
          { keys: 'Ctrl + Shift + V', action: 'Paste as plain text' },
        ],
      },
      {
        category: 'Find & Replace',
        items: [
          { keys: 'Ctrl + F', action: 'Find in document' },
          { keys: 'Ctrl + H', action: 'Find & Replace' },
        ],
      },
      {
        category: 'Editor',
        items: [
          { keys: 'Ctrl + Shift + /', action: 'Show this keyboard shortcuts dialog' },
        ],
      },
    ],
  },

  contextMenu: {
    cut:           'Cut',
    copy:          'Copy',
    paste:         'Paste',
    bold:          'Bold',
    italic:        'Italic',
    underline:     'Underline',
    textColor:     'Text Color',
    highlightColor: 'Highlight Color',
    copyFormat:    'Copy Format',
    pasteFormat:   'Paste Format',
    removeFormat:  'Remove Format',
    link:          'Insert Link',
    image:         'Insert Image',
    video:         'Insert Video',
    table:         'Insert Table',
    back:          'Back',
    noHighlight:   'No highlight',
    customColor:   'Custom color',
    customColorLabel: 'Custom\u2026',
  },

  statusbar: {
    resizeHandle: 'Resize editor',
    /** @param {number} n */
    words:      (n) => `Words: ${n}`,
    /** @param {number} n @param {number} max */
    wordsLimit: (n, max) => `Words: ${n}/${max}`,
    /** @param {number} n */
    chars:      (n) => `Chars: ${n}`,
    /** @param {number} n @param {number} max */
    charsLimit: (n, max) => `Chars: ${n}/${max}`,
  },

  tooltips: {
    link: {
      ariaLabel:  'Link actions',
      openLink:   'Open link',
      copyUrl:    'Copy URL',
      editLink:   'Edit link',
      removeLink: 'Remove link',
    },
    image: {
      ariaLabel:    'Image actions',
      label:        'Image',
      floatLeft:    'Float Left',
      noFloat:      'No Float',
      alignCenter:  'Align Center',
      floatRight:   'Float Right',
      originalSize: 'Original Size',
      rotateLeft:   'Rotate Left',
      rotateRight:  'Rotate Right',
      cropImage:    'Crop Image',
      addCaption:   'Add / Edit Caption',
      deleteImage:  'Delete Image',
    },
    code: {
      ariaLabel:          'Code block actions',
      label:              'Code',
      syntaxLanguage:     'Syntax Language',
      syntaxAriaLabel:    'Syntax language',
      copyCode:           'Copy Code',
      toggleWordWrap:     'Toggle Word Wrap',
      enableWordWrap:     'Enable Word Wrap',
      disableWordWrap:    'Disable Word Wrap',
      convertToParagraph: 'Convert to Paragraph',
      deleteCodeBlock:    'Delete Code Block',
    },
    table: {
      ariaLabel:          'Table actions',
      label:              'Table',
      selectCells:        'Select Cells',
      addRowAbove:        'Add Row Above',
      addRowBelow:        'Add Row Below',
      deleteRow:          'Delete Row',
      addColumnLeft:      'Add Column Left',
      addColumnRight:     'Add Column Right',
      deleteColumn:       'Delete Column',
      mergeCells:         'Merge Cells',
      unmergeCells:       'Unmerge Cells',
      columnWidth:        'Column Width',
      rowHeight:          'Row Height',
      tableBorderWidth:   'Table Border Width',
      deleteTable:        'Delete Table',
      columnWidthPx:      'Column Width (px)',
      rowHeightPx:        'Row Height (px)',
      tableBorderWidthPx: 'Table Border Width (px)',
      cancelBtn:          'Cancel',
      applyBtn:           'Apply',
    },
    video: {
      ariaLabel:    'Video actions',
      label:        'Video',
      floatLeft:    'Float Left',
      noFloat:      'No Float',
      alignCenter:  'Align Center',
      floatRight:   'Float Right',
      originalSize: 'Original Size',
      previewVideo: 'Preview Video',
      exitPreview:  'Exit Preview',
      deleteVideo:  'Delete Video',
    },
  },

  errors: {
    /** @param {string} type */
    imageFormat: (type) =>
      `Format "${type}" is not supported for display in web browsers. Please convert to JPEG, PNG, or WebP first.`,
    /** @param {number} maxSize */
    imageSize: (maxSize) =>
      `Image file is too large. Maximum allowed size is ${maxSize} MB.`,
  },
};
