import { jsx as i } from "react/jsx-runtime";
import { FileDownloadDefaultIcon as r } from "../../../icons/FileDownloadDefaultIcon.js";
import { UIButton as l } from "../../../ui/Button.js";
import { b as d } from "../../../../ToolbarLayout.module-cbc8e216.js";
import m from "../../../ui/RPTooltip.js";
import { useLocalizationContext as p } from "../../../../contexts/LocalizationContext.js";
const f = ({ children: t, className: n, localeMessages: o }) => /* @__PURE__ */ i(m, { className: n, content: o == null ? void 0 : o.downloadFileTooltip, children: t }), c = ({ icon: t }) => {
  const { download: n } = d(), { localeMessages: o } = p();
  return /* @__PURE__ */ i(f, { localeMessages: o, children: /* @__PURE__ */ i(l, { onClick: n, "aria-label": o == null ? void 0 : o.downloadFileTooltip, children: t || /* @__PURE__ */ i(r, {}) }) });
};
export {
  c as FileDownloadTool
};
