import { _objectWithoutProperties } from "../../../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectWithoutProperties.js";
import { getValueByKeys } from "../../utils/index.js";
import React, { useMemo } from "react";
import { isString } from "@pisell/utils";
//#region src/components/table/Table/fields/link/Show/index.tsx
const _excluded = [
	"title",
	"editable",
	"dataIndex",
	"field_type",
	"record",
	"handleSave"
];
const Show = (props) => {
	const { title, editable, dataIndex, field_type, record, handleSave } = props;
	_objectWithoutProperties(props, _excluded);
	const content = getValueByKeys(record, dataIndex);
	const field = useMemo(() => {
		if (isString(content)) return {
			content,
			url: content
		};
		return content;
	}, [content]);
	return /* @__PURE__ */ React.createElement("a", {
		className: "",
		href: field.url,
		target: "_blank",
		onClick: (e) => e.stopPropagation()
	}, field.content);
};
//#endregion
export { Show as default };
