import { Box, Button, Loader } from '@wix/design-system'; import React from 'react'; import { useWixPatternsContainer } from '@wix/bex-core/react'; import { useFormPageContext } from '../../providers'; import { observer } from 'mobx-react-lite'; import { MoreActionsElement } from '../MoreActions'; import { ActionsBarConfig, ctaKeys } from '@wix/bex-core'; import { useIsMobile } from '../../hooks/useIsMobile'; export interface FormPageActionsBarProps { moreActions?: MoreActionsElement; onCancel?: () => void; onSave?: () => void; actionsBarConfig?: ActionsBarConfig; } export function _FormPageActionsBar({ moreActions, onCancel, onSave, actionsBarConfig, }: FormPageActionsBarProps) { const { translate: t, initTask } = useWixPatternsContainer(); const state = useFormPageContext(); const isMobile = useIsMobile(); if (!initTask.status.isSuccess) { return null; } return ( {isMobile ? undefined : moreActions} ); } export const FormPageActionsBar = observer(_FormPageActionsBar);