'use strict';
import { jsx } from 'react/jsx-runtime';
import { Button } from '../../../fd-component-toolbox/button/Button.js';
import { Icon, iconSizes, iconNames } from '../../../fd-component-toolbox/icon/Icon.js';
import { tableElementSuffixes } from '../../../fd-component-toolbox/constants/table-element-suffixes.js';
import { index } from 'drizzle-orm/mysql-core';

var __defProp = Object.defineProperty;
var __name = (target, value) => __defProp(target, "name", {
  value,
  configurable: true
});
function TableHeaderActionButton({
  onClick,
  icon,
  tooltipText
}) {
  return /* @__PURE__ */jsx("div", {
    className: "relative",
    children: /* @__PURE__ */jsx(Button, {
      id: tableElementSuffixes.addButton,
      variant: "icon",
      size: "icon",
      className: "size-7",
      onClick,
      tooltipText: tooltipText ?? "Add",
      tooltipClassName: "mb-1",
      tooltipSide: "top",
      children: /* @__PURE__ */jsx(Icon, {
        name: icon ?? iconNames.plus,
        size: iconSizes.small,
        color: "text-fd-accent",
        className: "stroke-fd-accent stroke-0.65"
      })
    })
  }, `tableHeaderCellActionButton${index}`);
}
__name(TableHeaderActionButton, "TableHeaderActionButton");
TableHeaderActionButton.displayName = "TableHeaderActionButton";

export { TableHeaderActionButton };
