"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.DetailViewLayout = void 0;
const i18n_1 = __importDefault(require("../../../../../locales/i18n.js"));
const react_1 = __importDefault(require("react"));
const classnames_1 = __importDefault(require("classnames"));
const cn_ui_1 = require("@cainiaofe/cn-ui");
require("./detail-view-layout.scss");
/**
 * 详情视图布局组件
 * 提供左右分栏的布局结构
 * 使用统一的公共类名，支持通过 className 传递自定义样式
 */
const DetailViewLayout = ({ 
// eslint-disable-next-line @typescript-eslint/no-unused-vars
viewId, leftContent, rightContent, emptyContent, isEmpty = false, className, toolbar, loading = false, loadingTip, }) => {
    const content = (react_1.default.createElement(react_1.default.Fragment, null,
        toolbar,
        react_1.default.createElement("div", { className: (0, classnames_1.default)('detail-view-wrapper', className) },
            react_1.default.createElement("div", { className: "detail-view-left" }, leftContent),
            react_1.default.createElement("div", { className: "detail-view-right" }, isEmpty ? (react_1.default.createElement("div", { className: "detail-view-empty" }, emptyContent || i18n_1.default.get({ id: 'NoData', dm: '暂无数据' }))) : (rightContent)))));
    if (loading) {
        return (react_1.default.createElement(cn_ui_1.CnLoading, { tip: loadingTip, inline: false, visible: loading }, content));
    }
    return content;
};
exports.DetailViewLayout = DetailViewLayout;
exports.default = exports.DetailViewLayout;
