"use strict";

exports.__esModule = true;
exports.handsontableRenderer = handsontableRenderer;
var _autocompleteRenderer = require("../autocompleteRenderer");
var _a11y = require("../../helpers/a11y");
var _element = require("../../helpers/dom/element");
const RENDERER_TYPE = exports.RENDERER_TYPE = 'handsontable';

/**
 * Handsontable renderer.
 *
 * @private
 * @param {Core} instance The Handsontable instance.
 * @param {HTMLTableCellElement} TD The rendered cell element.
 * @param {number} row The visual row index.
 * @param {number} col The visual column index.
 * @param {number|string} prop The column property (passed when datasource is an array of objects).
 * @param {*} value The rendered value.
 * @param {object} cellProperties The cell meta object ({@see Core#getCellMeta}).
 */
function handsontableRenderer(instance, TD, row, col, prop, value, cellProperties) {
  _autocompleteRenderer.autocompleteRenderer.apply(this, [instance, TD, row, col, prop, value, cellProperties]);
  if (instance.getSettings().ariaTags) {
    (0, _element.setAttribute)(TD, [(0, _a11y.A11Y_HASPOPUP)('true'), (0, _a11y.A11Y_EXPANDED)('false')]);
  }
}
handsontableRenderer.RENDERER_TYPE = RENDERER_TYPE;