import { params } from '@nanostores/i18n'

import { i18n } from './i18n'

export const menuMessages = i18n('menu', {
  file: 'File',
  edit: 'Edit',
  view: 'View',
  object: 'Object',
  arrange: 'Arrange',
  text: 'Text',

  new: 'New',
  open: 'Open…',
  save: 'Save',
  saveAs: 'Save as…',
  exportSelection: 'Export selection…',
  autosave: 'Auto-save to local file',

  copy: 'Copy',
  paste: 'Paste',

  zoomIn: 'Zoom in',
  zoomOut: 'Zoom out',
  profiler: 'Performance profiler',
  language: 'Language',

  moveToPage: 'Move to page',
  createInstance: 'Create instance',
  hide: 'Hide',
  show: 'Show',
  lock: 'Lock',
  unlock: 'Unlock',
  cut: 'Cut',
  front: 'Front',
  back: 'Back',
  toggleUI: 'Toggle UI',

  bold: 'Bold',
  italic: 'Italic',
  underline: 'Underline',

  pasteHere: 'Paste here',
  copyPasteAs: 'Copy/Paste as',
  copyAsText: 'Copy as text',
  copyAsSVG: 'Copy as SVG',
  copyAsPNG: 'Copy as PNG',
  copyAsJSX: 'Copy as JSX',
  copyNodeId: 'Copy node ID',
  copyXPath: 'Copy XPath'
})

export const commandMessages = i18n('commands', {
  undo: 'Undo',
  redo: 'Redo',
  selectAll: 'Select all',
  duplicate: 'Duplicate',
  delete: 'Delete',
  group: 'Group',
  ungroup: 'Ungroup',
  createComponent: 'Create component',
  createComponentSet: 'Create component set',
  createInstance: 'Create instance',
  detachInstance: 'Detach instance',
  goToMainComponent: 'Go to main component',
  addAutoLayout: 'Add auto layout',
  bringToFront: 'Bring to front',
  sendToBack: 'Send to back',
  toggleVisibility: 'Toggle visibility',
  toggleLock: 'Toggle lock',
  moveToPage: 'Move to page',
  zoomTo100: 'Zoom to 100%',
  zoomToFit: 'Zoom to fit',
  zoomToSelection: 'Zoom to selection'
})

export const toolMessages = i18n('tools', {
  move: 'Move',
  frame: 'Frame',
  section: 'Section',
  rectangle: 'Rectangle',
  ellipse: 'Ellipse',
  line: 'Line',
  polygon: 'Polygon',
  star: 'Star',
  pen: 'Pen',
  text: 'Text',
  hand: 'Hand'
})

export const panelMessages = i18n('panels', {
  layers: 'Layers',
  pages: 'Pages',
  design: 'Design',
  code: 'Code',
  ai: 'AI',
  assets: 'Assets',

  page: 'Page',
  position: 'Position',
  layout: 'Layout',
  autoLayout: 'Auto layout',
  alignment: 'Alignment',
  appearance: 'Appearance',
  fill: 'Fill',
  stroke: 'Stroke',
  effects: 'Effects',
  export: 'Export',
  typography: 'Typography',
  variables: 'Variables',
  constraints: 'Constraints',

  addFill: 'Add fill',
  addStroke: 'Add stroke',
  addEffect: 'Add effect',
  addExport: 'Add export',

  dropShadow: 'Drop shadow',
  innerShadow: 'Inner shadow',
  layerBlur: 'Layer blur',
  backgroundBlur: 'Background blur',

  noSelection: 'No selection',
  noLocalVariables: 'No local variables',
  openVariables: 'Open variables',
  addPage: 'Add page',
  toggleVisibility: 'Toggle visibility',
  independentCornerRadii: 'Independent corner radii',
  detachVariable: 'Detach variable',
  applyVariable: 'Apply variable',
  noVariablesFound: 'No variables found',
  addAutoLayout: 'Add auto layout (Shift+A)',
  removeAutoLayout: 'Remove auto layout',
  alignLeft: 'Align left',
  alignCenterHorizontally: 'Align center horizontally',
  alignRight: 'Align right',
  alignTop: 'Align top',
  alignCenterVertically: 'Align center vertically',
  alignBottom: 'Align bottom',
  flipHorizontal: 'Flip horizontal',
  flipVertical: 'Flip vertical',
  rotate90: 'Rotate 90°',
  mixedFillsHelp: 'Click + to replace mixed fills',
  mixedStrokesHelp: 'Click + to replace mixed strokes',
  mixedEffectsHelp: 'Click + to replace mixed effects',
  strokeSides: 'Stroke sides',
  strokeAlignInside: 'Inside',
  strokeAlignCenter: 'Center',
  strokeAlignOutside: 'Outside',
  exportPreview: 'Preview',
  exportRenderingPreview: 'Rendering preview…',
  createVariable: 'Create variable',
  mixed: 'Mixed',
  layersCount: params('{count} layers'),
  goToMainComponent: 'Go to Main Component',
  detachInstance: 'Detach Instance',

  solid: 'Solid',
  linearGradient: 'Linear',
  radialGradient: 'Radial',
  image: 'Image',
  stops: 'Stops',
  addStop: 'Add stop',

  alignCenter: 'Align center',
  alignMiddle: 'Align middle',
  clipContent: 'Clip content',
  colorFormatRgb: 'RGB',
  colorFormatHsl: 'HSL',
  colorFormatHsb: 'HSB',
  colorFormatOkhcl: 'OkHCL',
  colorHintHsl: 'H hue · S saturation · L lightness',
  colorHintHsb: 'H hue · S saturation · B brightness',
  colorHintOkhcl: 'H hue · C chroma · L lightness · A alpha',
  colorPreviewClipped: params('Clipped to {space} preview gamut'),
  rulers: 'Rulers',
  multiplayerCursors: 'Multiplayer cursors',
  direction: 'Direction',
  flow: 'Flow',
  auto: 'Auto',
  columns: 'Columns',
  rows: 'Rows',
  sizingFixed: 'Fixed',
  sizingHug: 'Hug',
  sizingFill: 'Fill',
  sizingHugShort: 'Hug',
  sizingFillShort: 'Fill',
  sizingFillFr: 'Fill (fr)',
  sizingFixedPx: 'Fixed (px)'
})

export const pageMessages = i18n('pages', {
  newPage: 'New page',
  rename: 'Rename',
  delete: 'Delete',
  pageName: params('Page {number}')
})

export const dialogMessages = i18n('dialogs', {
  cancel: 'Cancel',
  apply: 'Apply',
  close: 'Close',
  ok: 'OK',
  copy: 'Copy',
  copied: 'Copied',
  createCollection: 'Create collection',
  localVariables: 'Local variables',
  noVariableCollections: 'No variable collections',
  selectLayerForJSX: 'Select a layer to see its JSX code',
  connectAIProvider: 'Connect an AI provider to start chatting.',
  connect: 'Connect',
  getAPIKey: params('Get an {provider} API key →'),
  oneKeyManyModels: 'One key for 100+ models from all providers.',
  describeChange: 'Describe a change…',
  describeCreateOrChange: 'Describe what you want to create or change.',
  stopGenerating: 'Stop generating',
  sendMessage: 'Send message',
  baseURLPlaceholder: 'Base URL (e.g. http://localhost:11434/v1)',
  modelIDPlaceholder: 'Model ID (e.g. llama-3.3-70b)',
  yourName: 'Your name',
  enterYourName: 'Enter your name',
  shareThisFile: 'Share this file',
  joinRoom: 'Join room',
  join: 'Join',
  roomLink: 'Room link',
  joinCollaboration: 'Join collaboration',
  orJoinRoom: 'or join a room',
  pasteRoomLinkOrId: 'Paste room link or ID',
  connected: 'Connected',
  search: 'Search…',
  noResults: 'No results',
  share: 'Share'
})
