import { findParent } from '../../utils/ui';
/**
 * The function checks if the input is an acceptable table row observer by comparing the host tag name and finding the parent vega-table element.
 *
 * @param {unknown} input - The `input` parameter is of type `unknown`, which means it can be any type.
 * @returns {boolean} a boolean value.
 */
export function isAcceptableTableRowObserver(input) {
  return (input['host']['tagName'] === 'VEGA-TABLE-ROW' &&
    findParent(this.host, 'vega-table') === findParent(input['host'], 'vega-table'));
}
/**
 * The function checks if the input is an acceptable table observer by verifying if it has a host with a tagName of 'VEGA-TABLE' and if the host is the parent of the current host.
 *
 * @param {unknown} input - The `input` parameter is of type `unknown`, which means it can be any type.
 * @returns {boolean} a boolean value indicating whether the input is an acceptable table observer.
 */
export function isAcceptableTableObserver(input) {
  return input['host']['tagName'] === 'VEGA-TABLE' && input['host'] === findParent(this.host, 'vega-table');
}
