"use strict";

exports.__esModule = true;
exports.useActionCellColumn = useActionCellColumn;
var _react = require("react");
var _useRenderActionCellColumn = require("./useRenderActionCellColumn");
var _useActionCellColumnBase = require("./useActionCellColumnBase");
var _react2 = require("@wix/bex-core/react");
function useActionCellColumn(params) {
  const {
    collection,
    actionCell,
    actionCellProps,
    actionCellWidth,
    sticky
  } = params;
  const {
    isPanelLayout
  } = (0, _react2.useWixPatternsContainer)();
  const baseColumn = (0, _useActionCellColumnBase.useActionCellColumnBase)({
    actionCellProps,
    actionCellWidth
  });
  const render = (0, _useRenderActionCellColumn.useRenderActionCellColumn)({
    actionCell,
    sticky,
    collection
  });
  return (0, _react.useMemo)(() => {
    if (isPanelLayout) {
      return null;
    }
    if (render == null) {
      return null;
    }
    return {
      ...baseColumn,
      render
    };
  }, [baseColumn, render, isPanelLayout]);
}
//# sourceMappingURL=useActionCellColumn.js.map