"use client";
import { jsx, jsxs } from "react/jsx-runtime";
import { MapPin } from "lucide-react";
import { useT } from "@open-mercato/shared/lib/i18n/context";
import { isVisible, getFieldLabel } from "./fieldConfig.js";
function LocationField({
  visible,
  activityType,
  location,
  setLocation
}) {
  const t = useT();
  if (!isVisible(activityType, "location")) return null;
  return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1.5", children: [
    /* @__PURE__ */ jsx("label", { className: "text-overline font-semibold text-muted-foreground tracking-wider", children: getFieldLabel(activityType, "location", t, "customers.schedule.location", "Location") }),
    /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 rounded-md border border-border bg-background px-3 py-2.5", children: [
      /* @__PURE__ */ jsx(MapPin, { className: "size-3.5 text-muted-foreground shrink-0" }),
      /* @__PURE__ */ jsx(
        "input",
        {
          type: "text",
          value: location,
          onChange: (e) => setLocation(e.target.value),
          placeholder: t("customers.schedule.locationPlaceholder", "Add location or meeting link..."),
          className: "flex-1 bg-transparent text-sm text-foreground placeholder:text-muted-foreground focus:outline-none"
        }
      )
    ] })
  ] });
}
export {
  LocationField
};
//# sourceMappingURL=LocationField.js.map
