"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = Cell;
var _composite = require("../composite");
var _tooltip = _interopRequireDefault(require("../tooltip"));
var _visuallyHidden = require("../visually-hidden");
var _utils = require("./utils");
var _styles = require("./styles");
var _jsxRuntime = require("react/jsx-runtime");
/**
 * Internal dependencies
 */

/**
 * Internal dependencies
 */

function Cell({
  id,
  value,
  ...props
}) {
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_tooltip.default, {
    text: _utils.ALIGNMENT_LABEL[value],
    children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_composite.Composite.Item, {
      id: id,
      render: /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.Cell, {
        ...props,
        role: "gridcell"
      }),
      children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_visuallyHidden.VisuallyHidden, {
        children: value
      }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.Point, {
        role: "presentation"
      })]
    })
  });
}
//# sourceMappingURL=cell.js.map