// src/pages/products/product-detail/components/product-seller-section/product-seller-section.tsx
import { TriangleRightMini } from "@medusajs/icons";
import { Avatar, Container, Heading } from "@medusajs/ui";
import { useTranslation } from "react-i18next";
import { Link } from "react-router-dom";
import { jsx, jsxs } from "react/jsx-runtime";
var ProductSellerSection = ({ seller }) => {
  const { t } = useTranslation();
  if (!seller) {
    return null;
  }
  return /* @__PURE__ */ jsxs(Container, { className: "p-0", children: [
    /* @__PURE__ */ jsx("div", { className: "flex items-center justify-between px-6 py-4", children: /* @__PURE__ */ jsx(Heading, { level: "h2", children: t("products.associatedStore") }) }),
    /* @__PURE__ */ jsx("div", { className: "txt-small flex flex-col gap-2 px-2 pb-2", children: /* @__PURE__ */ jsx(
      Link,
      {
        to: `/stores/${seller.id}`,
        className: "outline-none focus-within:shadow-borders-interactive-with-focus rounded-md [&:hover>div]:bg-ui-bg-component-hover",
        children: /* @__PURE__ */ jsx("div", { className: "shadow-elevation-card-rest bg-ui-bg-component rounded-md px-4 py-2 transition-colors", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
          /* @__PURE__ */ jsx(
            Avatar,
            {
              src: seller.logo ?? void 0,
              fallback: seller.name.charAt(0).toUpperCase()
            }
          ),
          /* @__PURE__ */ jsx("div", { className: "flex flex-1 flex-col", children: /* @__PURE__ */ jsx("span", { className: "text-ui-fg-base font-medium", children: seller.name }) }),
          /* @__PURE__ */ jsx("div", { className: "size-7 flex items-center justify-center", children: /* @__PURE__ */ jsx(TriangleRightMini, { className: "text-ui-fg-muted rtl:rotate-180" }) })
        ] }) })
      }
    ) })
  ] });
};

export {
  ProductSellerSection
};
