import { jsx, jsxs } from "react/jsx-runtime";
import { getAssetUrl } from "../../utils/assetBase.js";
import { Tooltip } from "../Tooltip/index.js";
const LogOutIcon = getAssetUrl("icons/logout-icon.svg");
function SidebarActions({ open, handleLogOut }) {
  const logoutRow = /* @__PURE__ */ jsxs(
    "div",
    {
      className: "impact-sidebar-actions-list-item logout-container",
      role: "button",
      tabIndex: 0,
      onClick: handleLogOut,
      onKeyDown: (e) => {
        if (e.key === "Enter" || e.key === " ") {
          e.preventDefault();
          handleLogOut();
        }
      },
      children: [
        /* @__PURE__ */ jsx("img", { alt: "", className: "logout-container-img", src: LogOutIcon }),
        /* @__PURE__ */ jsx("div", { className: "impact-sidebar-actions-list-item-label", children: "Logout" })
      ]
    }
  );
  if (open) {
    return logoutRow;
  }
  return /* @__PURE__ */ jsx(Tooltip, { orientation: "right", title: "Logout", variant: "tertiary", children: logoutRow });
}
SidebarActions.displayName = "SidebarActions";
export {
  SidebarActions
};
