import React from 'react';
import { Button } from '@wix/design-system';
import { Add } from '@wix/wix-ui-icons-common';
import { useWixPatternsContainer } from '@wix/bex-core/react';
import { useToolbarCollectionContext } from '../ToolbarCollectionContext';
import { useSelector } from '../../useSelector';
export const PrimaryActionButton = (props) => {
    const { translate: t, initTask } = useWixPatternsContainer();
    const { toolbarBIReporter } = useToolbarCollectionContext();
    const { priority = 'primary' } = props;
    useSelector(() => initTask.status);
    return (React.createElement(Button, { prefixIcon: React.createElement(Add, null), ...props, as: "button", size: "small", priority: priority, skin: "standard", dataHook: "toolbar-primary-action-button", onClick: (event) => {
            toolbarBIReporter.onPrimaryActionButtonClick();
            props.onClick?.(event);
        } }, props.children ??
        t('cairo.collectionsPage.add.item.CTA', { defaultValue: '' })));
};
PrimaryActionButton.displayName = 'PrimaryActionButton';
//# sourceMappingURL=PrimaryActionButton.js.map