export const VegaDropdownRuntimeMetricsPayloadDefinition = [
  {
    payloadKey: 'IS_USING_TEMPLATE',
    payloadDescription: 'Contains the data records to be rendered and displayed within the dropdown',
    /**
     * The function checks if the length `source` property of the `host` element is equal to '0'.
     * If it is, the function will return `true`.
     *
     * @param {HTMLElement} host - The element to check
     * @returns {boolean} A boolean value
     */
    payloadValue: (host) => host.source.length === 0,
  },
  {
    payloadKey: 'IS_USING_DATA_SOURCE',
    payloadDescription: 'Contains the data records to be rendered and displayed within the dropdown',
    /**
     * The function checks if the length `source` property of the `host` element is not equal to '0'.
     * If it is, the function will return `true`.
     *
     * @param {HTMLElement} host - The element to check
     * @returns {boolean} A boolean value
     */
    payloadValue: (host) => host.source.length > 0,
  },
];
