"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.DetailNavigation = 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");
/**
 * 详情视图导航组件
 * 包含上一条/下一条按钮和操作列
 * 使用统一的公共类名，支持通过 className 传递自定义样式
 */
const DetailNavigation = ({ selectedIndex, totalCount, onPrevious, onNext, renderOperateCell, selectedRecord, className, }) => {
    return (react_1.default.createElement("div", { className: (0, classnames_1.default)('detail-view-navigation', className) },
        react_1.default.createElement("div", { className: "detail-view-navigation-left" },
            react_1.default.createElement(cn_ui_1.CnButton, { size: "small", disabled: selectedIndex === 0, onClick: onPrevious, className: "detail-view-nav-button" },
                react_1.default.createElement(cn_ui_1.CnIcon, { type: "arrow-up1", size: "small" }),
                react_1.default.createElement("span", null, i18n_1.default.get({ id: 'PreviousArticle', dm: '上一条' }))),
            react_1.default.createElement(cn_ui_1.CnButton, { size: "small", disabled: selectedIndex === totalCount - 1, onClick: onNext, className: "detail-view-nav-button" },
                react_1.default.createElement("span", null, i18n_1.default.get({ id: 'NextArticle', dm: '下一条' })),
                react_1.default.createElement(cn_ui_1.CnIcon, { type: "arrow-down1", size: "small" }))),
        react_1.default.createElement("div", { className: "detail-view-navigation-right" }, renderOperateCell && selectedRecord ? (react_1.default.createElement("div", { className: "detail-view-operate-cell cn-table-row" }, renderOperateCell(selectedRecord, selectedIndex))) : null)));
};
exports.DetailNavigation = DetailNavigation;
exports.default = exports.DetailNavigation;
