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 { cairoPageCtaClicked } from '@wix/bex-core/bi';
import { usePageButtonBiParams } from '../usePageButtonBiParams';
/**
 * @deprecated
 * Use `PrimaryActions` component instead.
 */
export function PrimaryPageButton({ onClick, text, prefixIcon, ...rest }) {
    const { translate: t, reportBi } = useWixPatternsContainer();
    const content = text ?? t('cairo.page.primary.cta');
    const { pageType, location } = usePageButtonBiParams();
    return (React.createElement(Button, { ...rest, prefixIcon: prefixIcon ?? React.createElement(Add, null), size: "medium", skin: "standard", as: "button", onClick: (e) => {
            reportBi(cairoPageCtaClicked({
                ctaName: content,
                ctaType: 'Primary Page Button',
                location,
                componentType: 'Page',
                pageType,
                section: 'Vertical',
            }));
            onClick(e);
        } }, content));
}
//# sourceMappingURL=PrimaryPageButton.js.map