import React from 'react';
import i18n from 'ui-i18n';
import { ErrorBoundary } from '../ErrorBoundary';
import { EMPTY_STATE_ICONS, EMPTY_STATE_VARIANTS, EmptyState } from '../EmptyState';
import { useStyles } from './styles';
export var SidePanel = function (_a) {
    var width = _a.width, open = _a.open, children = _a.children;
    var styles = useStyles();
    return (React.createElement("div", { className: styles.contentWrapper, "data-reltio-id": "side-panel", style: {
            width: width ? "".concat(open ? width : 0, "px") : '100%'
        } },
        React.createElement(ErrorBoundary, { error: React.createElement(EmptyState, { LogoRenderer: EMPTY_STATE_ICONS.ERROR, text: i18n.text('Something went wrong'), variant: EMPTY_STATE_VARIANTS.full }) }, open && children)));
};
