import { t as e } from "../../../button-BNOmhdpM.js";
import { t } from "../../../input-CSc-AfAa.js";
import { useState as n } from "react";
import { jsx as r, jsxs as i } from "react/jsx-runtime";
import { Eye as a, EyeOff as o } from "lucide-react";
//#region lib/components/ui/molecules/client-secret-field.tsx
var s = ({ mode: s, secretIsSet: c, disabled: l, ...u }) => {
	let [d, f] = n(!1), p = "Leave empty to keep current, or enter new secret to replace";
	return s === "create" ? p = "Enter client secret" : l && (p = "Client secret is configured and cannot be modified"), /* @__PURE__ */ i("div", {
		className: "space-y-2",
		children: [!!(s === "rotate" && (c ?? !1)) && /* @__PURE__ */ r("div", {
			className: "flex items-center justify-between rounded border-2 border-amber-200/60 bg-amber-50/30 p-2 dark:border-amber-800/40 dark:bg-amber-950/20",
			children: /* @__PURE__ */ i("div", {
				className: "flex items-center gap-2",
				children: [/* @__PURE__ */ r("div", { className: "h-1.5 w-1.5 rounded-full bg-amber-500" }), /* @__PURE__ */ r("span", {
					className: "font-medium text-xs",
					children: "A secret is set"
				})]
			})
		}), /* @__PURE__ */ i("div", {
			className: "relative",
			children: [/* @__PURE__ */ r(t, {
				autoComplete: "client-secret",
				disabled: l,
				placeholder: p,
				type: d ? "text" : "password",
				...u
			}), /* @__PURE__ */ r(e, {
				"aria-label": d ? "Hide secret" : "Show secret",
				className: "absolute top-1/2 right-2 h-auto -translate-y-1/2 px-2 py-1",
				disabled: l,
				onClick: () => f((e) => !e),
				size: "sm",
				type: "button",
				variant: "ghost",
				children: r(d ? o : a, { className: "size-4" })
			})]
		})]
	});
};
//#endregion
export { s as ClientSecretInput };
