import { useMemo } from 'react';
import { useRenderActionCellColumn } from './useRenderActionCellColumn';
import { useActionCellColumnBase } from './useActionCellColumnBase';
import { useWixPatternsContainer } from '@wix/bex-core/react';
export function useActionCellColumn(params) {
    const { collection, actionCell, actionCellProps, actionCellWidth, sticky } = params;
    const { isPanelLayout } = useWixPatternsContainer();
    const baseColumn = useActionCellColumnBase({
        actionCellProps,
        actionCellWidth,
    });
    const render = useRenderActionCellColumn({
        actionCell,
        sticky,
        collection,
    });
    return useMemo(() => {
        if (isPanelLayout) {
            return null;
        }
        if (render == null) {
            return null;
        }
        return {
            ...baseColumn,
            render,
        };
    }, [baseColumn, render, isPanelLayout]);
}
//# sourceMappingURL=useActionCellColumn.js.map