const require_runtime = require("../../../../../../_virtual/_rolldown/runtime.js");
const require_objectWithoutProperties = require("../../../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectWithoutProperties.js");
const require_useSharedState = require("../../../../../../hooks/useSharedState.js");
const require_model = require("../../../../model.js");
const require_index = require("../../utils/index.js");
let react = require("react");
react = require_runtime.__toESM(react);
let classnames = require("classnames");
classnames = require_runtime.__toESM(classnames);
require("./index.less");
//#region src/components/table/Table/fields/text/Show/index.tsx
const _excluded = [
	"title",
	"editable",
	"dataIndex",
	"field_type",
	"record",
	"handleSave",
	"action",
	"contentClassName"
];
const Show = (props) => {
	const modal = require_useSharedState.default(require_model.Context), { title, editable, dataIndex, field_type, record, handleSave, action, contentClassName } = props;
	require_objectWithoutProperties._objectWithoutProperties(props, _excluded);
	const onClick = () => {
		var _modal$state;
		if (action && (modal === null || modal === void 0 || (_modal$state = modal.state) === null || _modal$state === void 0 || (_modal$state = _modal$state.utils) === null || _modal$state === void 0 ? void 0 : _modal$state.action)) {
			var _modal$state2;
			modal === null || modal === void 0 || (_modal$state2 = modal.state) === null || _modal$state2 === void 0 || (_modal$state2 = _modal$state2.utils) === null || _modal$state2 === void 0 || _modal$state2.action({
				type: action,
				data: record
			});
		}
	};
	return /* @__PURE__ */ react.default.createElement("div", {
		className: (0, classnames.default)(contentClassName || "", { "table-fields-text-link": action }, contentClassName),
		onClick
	}, require_index.getValueByKeys(record, dataIndex));
};
//#endregion
exports.default = Show;
