import * as tslib_1 from "tslib";
import { create, tsx } from '@dojo/framework/core/vdom';
import Button from '../button/index';
import * as floatingActionButtonCss from '../theme/default/floating-action-button.m.css';
import * as buttonCss from '../theme/default/button.m.css';
import theme from '../middleware/theme';
const factory = create({ theme }).properties();
export const FloatingActionButton = factory(function FloatingActionButton({ properties, children, middleware: { theme } }) {
    const _a = properties(), { size = 'normal', position } = _a, props = tslib_1.__rest(_a, ["size", "position"]);
    const classes = theme.classes(floatingActionButtonCss);
    let positionClass;
    switch (position) {
        case 'bottom-left':
            positionClass = classes.bottomLeft;
            break;
        case 'bottom-right':
            positionClass = classes.bottomRight;
            break;
        case 'bottom-center':
            positionClass = classes.bottomCenter;
            break;
        case 'left-center':
            positionClass = classes.leftCenter;
            break;
        case 'right-center':
            positionClass = classes.rightCenter;
            break;
        case 'top-left':
            positionClass = classes.topLeft;
            break;
        case 'top-right':
            positionClass = classes.topRight;
            break;
        case 'top-center':
            positionClass = classes.topCenter;
            break;
    }
    return (tsx(Button, Object.assign({}, props, { theme: theme.compose(buttonCss, floatingActionButtonCss), classes: {
            '@dojo/widgets/button': {
                root: [
                    size === 'extended' && classes.extended,
                    size === 'small' && classes.small,
                    positionClass
                ]
            }
        } }), {
        label: (tsx("virtual", null,
            tsx("span", { aria: "hidden", classes: classes.effect }),
            children()))
    }));
});
export default FloatingActionButton;

/*# sourceMappingURL=index.mjs.map*/