import { FieldSchema } from '@ephox/boulder';
import * as SketchBehaviours from '../component/SketchBehaviours';
import * as Sketcher from './Sketcher';
const factory = (detail) => {
    const { attributes, ...domWithoutAttributes } = detail.dom;
    return {
        uid: detail.uid,
        dom: {
            tag: 'div',
            attributes: {
                role: 'presentation',
                ...attributes
            },
            ...domWithoutAttributes
        },
        components: detail.components,
        behaviours: SketchBehaviours.get(detail.containerBehaviours),
        events: detail.events,
        domModification: detail.domModification,
        eventOrder: detail.eventOrder
    };
};
const Container = Sketcher.single({
    name: 'Container',
    factory,
    configFields: [
        FieldSchema.defaulted('components', []),
        SketchBehaviours.field('containerBehaviours', []),
        // TODO: Deprecate
        FieldSchema.defaulted('events', {}),
        FieldSchema.defaulted('domModification', {}),
        FieldSchema.defaulted('eventOrder', {})
    ]
});
export { Container };
//# sourceMappingURL=Container.js.map