import React, { useContext } from 'react';
import { AnnounceContext, Button, Box, Layer } from 'grommet';
import { LayerHeader } from '@shared/aries-core';
import { LayerForm } from './ConfigurationForm';
import {
ConfirmationProvider,
ConfirmationContext,
DoubleConfirmation,
useConfirmation,
} from './components';
const modalTitle = 'Add application modal';
export const LayerExample = () => {
const announce = useContext(AnnounceContext);
return (
{({ showLayer, showConfirmation, setShowLayer }) => {
return (
<>
{showLayer ? : null}
{showConfirmation ? (
) : null}
>
);
}}
);
};
const AddApplication = ({ ...rest }) => {
const announce = useContext(AnnounceContext);
const { onClose } = useConfirmation();
const closeLayer = () => {
announce(`${modalTitle} closed.`, 'polite');
onClose();
};
return (
);
};