import { jsx } from "react/jsx-runtime";
import { _ as __ } from "../../default-i18n-CN_q3KUs.js";
import { icons } from "../../icons/icons.js";
import { RichLabel } from "../rich-label/rich-label.js";
import { c as clsx } from "../../lite-DVmmD_-j.js";
/**
 * A simple file placeholder.
 *
 * @component
 * @param {Object} props - Component props.
 * @param {JSX.Element} [props.icon] - File type icon override.
 * @param {string} [props.fileName] - Current file name.
 * @param {string} [props.className] - Classes to pass to the component.
 *
 * @returns {JSX.Element} The FilePlaceholder component.
 *
 * @example
 * <FilePlaceholder />
 *
 * @example
 * <FilePlaceholder fileName='demo.json' />
 *
 * @preserve
 */
const FilePlaceholder = (props) => {
  const { icon, fileName, className, children } = props;
  return /* @__PURE__ */ jsx(
    RichLabel,
    {
      icon: /* @__PURE__ */ jsx(
        "div",
        {
          className: clsx(
            "es:w-fit es:rounded-xl es:border es:border-secondary-300 es:p-2",
            fileName && "es:shadow-sm es:bg-gradient-to-br es:from-secondary-50 es:to-secondary-100 es:text-secondary-600",
            !fileName && "es:border-dashed es:text-secondary-500"
          ),
          children: icon ?? icons.file
        }
      ),
      label: (fileName ? fileName : children) ?? __("No file selected", "eightshift-ui-components"),
      className: clsx(fileName && "es:font-mono", className),
      noColor: true
    }
  );
};
export {
  FilePlaceholder
};
