export const VegaDatePickerRuntimeMetricsPayloadDefinition = [
  {
    payloadKey: 'AUTO_VALIDATION_IS_TRUE',
    payloadDescription: 'Determines whether automatic validation should be implemented when a date or range is selected',
    /**
     * 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 when a date or range is selected',
    /**
     * 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 selection mode of the date picker. Use `single` to allow selecting a single date',
    /**
     * 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 selection mode of the date picker. Use `range` to allow selecting a date 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',
  },
];
