"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Code = void 0;
const tslib_1 = require("tslib");
const React = tslib_1.__importStar(require("react"));
const nano_theme_1 = require("nano-theme");
const blockClass = (0, nano_theme_1.drule)({
    ...nano_theme_1.theme.font.mono.mid,
    fz: '.9em',
    pdt: '.05em',
    pdb: '.05em',
});
const startClass = (0, nano_theme_1.rule)({
    borderTopLeftRadius: '.3em',
    borderBottomLeftRadius: '.3em',
    pdl: '.24em',
});
const endClass = (0, nano_theme_1.rule)({
    borderTopRightRadius: '.3em',
    borderBottomRightRadius: '.3em',
    pdr: '.24em',
});
const Code = (props) => {
    const { children, attr } = props;
    const theme = (0, nano_theme_1.useTheme)();
    const className = blockClass({
        bg: theme.g(0.2, 0.1),
    }) +
        (attr.isStart() ? startClass : '') +
        (attr.isEnd() ? endClass : '');
    return React.createElement("span", { className: className }, children);
};
exports.Code = Code;
//# sourceMappingURL=Code.js.map