import {ComponentType} from 'react'
import {Plugin as Plugin_2} from 'sanity'

declare interface VisionConfig {
  defaultApiVersion: string
  defaultDataset?: string
}

/**
 * @alpha
 */
export declare type VisionLocaleResourceKeys = keyof typeof visionLocaleStrings

/**
 * Defined locale strings for the vision tool, in US English.
 *
 * @internal
 */
declare const visionLocaleStrings: {
  /** Label for action "Copy to clipboard", tied to the "Query URL" field. Also used for accessibility purposes on button */
  readonly 'action.copy-url-to-clipboard': 'Copy to clipboard'
  /** Label for stopping an ongoing listen operation */
  readonly 'action.listen-cancel': 'Stop'
  /** Label for setting up a listener */
  readonly 'action.listen-execute': 'Listen'
  /** Label for cancelling an ongoing query */
  readonly 'action.query-cancel': 'Cancel'
  /** Label for executing the query, eg doing a fetch */
  readonly 'action.query-execute': 'Fetch'
  /**
   * Some features has a "New" label indicating that the feature was recently introduced.
   * This defines what the text of that label is. Keep it short and sweet.
   */
  readonly 'label.new': 'New'
  /** Error message for when the "Params" input are not a valid json */
  readonly 'params.error.params-invalid-json': 'Parameters are not valid JSON'
  /** Label for "Params" (parameters) editor/input */
  readonly 'params.label': 'Params'
  /** Label for 'Column' indicator when there is an error within the query */
  readonly 'query.error.column': 'Column'
  /** Label for 'Line' indicator when there is an error within the query */
  readonly 'query.error.line': 'Line'
  /** Label for "Query" editor/input */
  readonly 'query.label': 'Query'
  /** Label for the "Query URL" field, shown after executing a query, and allows for copying */
  readonly 'query.url': 'Query URL'
  /** Label for "End to End time" information of the fetched query */
  readonly 'result.end-to-end-time-label': 'End-to-end'
  /** Label for "Execution time" information of the fetched query */
  readonly 'result.execution-time-label': 'Execution'
  /** Label for "Result" explorer/view */
  readonly 'result.label': 'Result'
  /** Tooltip text shown when the query result is not encodable as CSV */
  readonly 'result.save-result-as-csv.not-csv-encodable': 'Result cannot be encoded as CSV'
  /** Label for "Save result as" result action */
  readonly 'result.save-result-as-format': 'Save result as <SaveResultButtons/>'
  /**
   * "Not applicable" message for when there is no Execution time or End to End time information
   * available for the query (eg when the query has not been executed, or errored)
   */
  readonly 'result.timing-not-applicable': 'n/a'
  /** Label for the "API version" dropdown in settings */
  readonly 'settings.api-version-label': 'API version'
  /** Label for the "Custom API version" input in settings, shown when "other" is chosen as API version */
  readonly 'settings.custom-api-version-label': 'Custom API version'
  /** Label for the "Dataset" dropdown in vision settings */
  readonly 'settings.dataset-label': 'Dataset'
  /** Error label for when the API version in 'Custom API version' input is invalid */
  readonly 'settings.error.invalid-api-version': 'Invalid API version'
  /** Label for the "other" versions within the "API version" dropdown */
  readonly 'settings.other-api-version-label': 'Other'
  /**
   * Label for the "Perspective" dropdown in vision settings
   * @see {@link https://www.sanity.io/docs/perspectives}
   */
  readonly 'settings.perspective-label': 'Perspective'
  /** Notification about previewDrafts to drafts rename */
  readonly 'settings.perspective.preview-drafts-renamed-to-drafts.description': 'The "<code>previewDrafts</code>" perspective has been renamed to "<code>drafts</code>" and is now deprecated. This change is effective for all versions with perspective support (>= v2021-03-25).'
  /** Call to action to read the docs related to "Perspectives" */
  readonly 'settings.perspectives.action.docs-link': 'Read docs'
  /** Option for selecting default perspective */
  readonly 'settings.perspectives.default': 'No perspective (API default)'
  /** Description for popover that explains what "Perspectives" are */
  readonly 'settings.perspectives.description': 'Perspectives allow your query to run against different "views" of the content in your dataset'
  /** Description for upcoming default perspective change */
  readonly 'settings.perspectives.new-default.description': 'The default perspective will change from "<code>raw</code>" to "<code>published</code>" in an upcoming API version. Please consult docs for more details.'
  /** Label for the pinned release perspective */
  readonly 'settings.perspectives.pinned-release-label': 'Pinned release'
  /** Title for popover that explains what "Perspectives" are */
  readonly 'settings.perspectives.title': 'Perspectives'
}

export declare const visionTool: Plugin_2<void | VisionToolConfig>

export declare interface VisionToolConfig extends Partial<VisionConfig> {
  name?: string
  title?: string
  icon?: ComponentType
}

export {}
