export const VegaTimePickerRuntimeMetricsPayloadDefinition = [
  {
    payloadKey: 'AUTO_VALIDATION_IS_TRUE',
    payloadDescription: 'Determines whether automatic validation should be implemented for the time picker during user input',
    /**
     * The function checks if the `autoValidation` property of the `host` element is equal to 'true'.
     * If it is, the function will return `true`.
     *
     * @param {HTMLElement} host - The element to check
     * @returns {boolean} A boolean value
     */
    payloadValue: (host) => host.autoValidation === true,
  },
  {
    payloadKey: 'AUTO_VALIDATION_IS_FALSE',
    payloadDescription: 'Determines whether automatic validation should be implemented for the time picker during user input',
    /**
     * The function checks if the `autoValidation` property of the `host` element is equal to 'false'.
     * If it is, the function will return `true`.
     *
     * @param {HTMLElement} host - The element to check
     * @returns {boolean} A boolean value
     */
    payloadValue: (host) => host.autoValidation === false,
  },
  {
    payloadKey: 'MODE_IS_SINGLE',
    payloadDescription: 'Specifies the mode for selecting time in the time picker, `single` indicates the ability to select a single time.',
    /**
     * The function checks if the `mode` property of the `host` element is equal to 'single'.
     * If it is, the function will return `true`.
     *
     * @param {HTMLElement} host - The element to check
     * @returns {boolean} A boolean value
     */
    payloadValue: (host) => host.mode === 'single',
  },
  {
    payloadKey: 'MODE_IS_RANGE',
    payloadDescription: 'Specifies the mode for selecting time in the time picker, `range` indicates the ability to select a time range',
    /**
     * The function checks if the `mode` property of the `host` element is equal to 'range'.
     * If it is, the function will return `true`.
     *
     * @param {HTMLElement} host - The element to check
     * @returns {boolean} A boolean value
     */
    payloadValue: (host) => host.mode === 'range',
  },
  {
    payloadKey: 'READ_ONLY_IS_TRUE',
    payloadDescription: 'Specifies whether the time picker field is set to read-only',
    /**
     * The function checks if the `readOnly` property of the `host` element is equal to 'true'.
     * If it is, the function will return `true`.
     *
     * @param {HTMLElement} host - The element to check
     * @returns {boolean} A boolean value
     */
    payloadValue: (host) => host.readOnly === true,
  },
  {
    payloadKey: 'READ_ONLY_IS_FALSE',
    payloadDescription: 'Specifies whether the time picker field is set to read-only',
    /**
     * The function checks if the `readOnly` property of the `host` element is equal to 'false'.
     * If it is, the function will return `true`.
     *
     * @param {HTMLElement} host - The element to check
     * @returns {boolean} A boolean value
     */
    payloadValue: (host) => host.readOnly === false,
  },
];
