import { jsx as i } from "react/jsx-runtime";
import { FileUploadDefaultIcon as p } from "../../../icons/FileUploadDefaultIcon.js";
import { UIButton as r } from "../../../ui/Button.js";
import { useOpenFileContext as l } from "../../../../contexts/FileInputContext.js";
import m from "../../../ui/RPTooltip.js";
import { useLocalizationContext as e } from "../../../../contexts/LocalizationContext.js";
const f = ({ children: t, className: n, localeMessages: o }) => /* @__PURE__ */ i(m, { className: n, content: o == null ? void 0 : o.openLocalFileTooltip, children: t }), U = ({ icon: t }) => {
  const { openFile: n } = l(), { localeMessages: o } = e();
  return /* @__PURE__ */ i(f, { localeMessages: o, children: /* @__PURE__ */ i(r, { onClick: n, "aria-label": o == null ? void 0 : o.openLocalFileTooltip, children: t || /* @__PURE__ */ i(p, {}) }) });
};
export {
  U as FileUploadTool
};
