"use strict";
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
const DataEditor = require("@glideapps/glide-data-grid");
const kit_DataGrid_customRenderers_utils = require("../utils.cjs");
const TEXT_CELL = "text-cell";
const renderer = {
  draw: (args, cell) => {
    const { ctx, rect, theme } = args;
    const xPad = theme.cellHorizontalPadding;
    const font = `${theme.baseFontStyle} ${theme.fontFamily}`;
    const middleCenterBias = DataEditor.getMiddleCenterBias(ctx, font);
    const x = rect.x + xPad;
    const y = rect.y + rect.height / 2 + middleCenterBias;
    const maxWidth = rect.width - 2 * theme.cellHorizontalPadding;
    ctx.fillStyle = theme.textHeader;
    kit_DataGrid_customRenderers_utils.drawTextWithEllipsis(ctx, cell.copyData, x, y, maxWidth);
    return true;
  },
  isMatch: (c) => c.data.kind === TEXT_CELL,
  kind: DataEditor.GridCellKind.Custom,
  needsHover: true,
  provideEditor: () => void 0
};
exports.TEXT_CELL = TEXT_CELL;
exports.default = renderer;
