"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var vdom_1 = require("@dojo/framework/core/vdom");
var index_1 = require("../button/index");
var floatingActionButtonCss = require("../theme/default/floating-action-button.m.css");
var buttonCss = require("../theme/default/button.m.css");
var theme_1 = require("../middleware/theme");
var factory = vdom_1.create({ theme: theme_1.default }).properties();
exports.FloatingActionButton = factory(function FloatingActionButton(_a) {
    var properties = _a.properties, children = _a.children, theme = _a.middleware.theme;
    var _b = properties(), _c = _b.size, size = _c === void 0 ? 'normal' : _c, position = _b.position, props = tslib_1.__rest(_b, ["size", "position"]);
    var classes = theme.classes(floatingActionButtonCss);
    var 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 (vdom_1.tsx(index_1.default, tslib_1.__assign({}, props, { theme: theme.compose(buttonCss, floatingActionButtonCss), classes: {
            '@dojo/widgets/button': {
                root: [
                    size === 'extended' && classes.extended,
                    size === 'small' && classes.small,
                    positionClass
                ]
            }
        } }), {
        label: (vdom_1.tsx("virtual", null,
            vdom_1.tsx("span", { aria: "hidden", classes: classes.effect }),
            children()))
    }));
});
exports.default = exports.FloatingActionButton;

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