"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.BranchDecorator = void 0;
var react_1 = __importDefault(require("react"));
var classnames_1 = __importDefault(require("classnames"));
var styles_1 = require("./styles");
var BranchDecorator = function (_a) {
    var _b;
    var className = _a.className, children = _a.children, _c = _a.plain, plain = _c === void 0 ? false : _c, _d = _a.enabled, enabled = _d === void 0 ? false : _d;
    var styles = (0, styles_1.useStyles)();
    return enabled ? (react_1.default.createElement("div", { "data-reltio-id": "branch-decorator", className: (0, classnames_1.default)(styles.decorator, (_b = {}, _b[styles.plain] = plain, _b), className) },
        react_1.default.createElement("div", { className: styles.wrapper }, children))) : (react_1.default.createElement(react_1.default.Fragment, null, children));
};
exports.BranchDecorator = BranchDecorator;
