var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
  // If the importer is in node compatibility mode or this is not an ESM
  // file that has been converted to a CommonJS file using a Babel-
  // compatible transform (i.e. "__esModule" has not been set), then set
  // "default" to the CommonJS "module.exports" for node compatibility.
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
  mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

// src/components/authentication/admin/AuthMethods/components/PasswordRulesSettingsContent.tsx
var PasswordRulesSettingsContent_exports = {};
__export(PasswordRulesSettingsContent_exports, {
  default: () => PasswordRulesSettingsContent_default
});
module.exports = __toCommonJS(PasswordRulesSettingsContent_exports);
var import_react = __toESM(require("react"));
var import_antd = require("antd");
var import_utils = require("@pisell/utils");
var PasswordRulesSettingsContent = ({
  onSettingsChange,
  initialSettings
}) => {
  const [settings, setSettings] = (0, import_react.useState)(initialSettings ?? {
    minLength: 8,
    requireUppercase: false,
    requireLowercase: false,
    requireNumbers: false,
    requireSpecialChars: false
  });
  const updateSettings = (updates) => {
    const newSettings = { ...settings, ...updates };
    setSettings(newSettings);
    onSettingsChange == null ? void 0 : onSettingsChange(newSettings);
  };
  return /* @__PURE__ */ import_react.default.createElement("div", { className: "settings-section" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "settings-section-title" }, import_utils.locales.getText("auth.password.requirements.title")), /* @__PURE__ */ import_react.default.createElement("div", { className: "settings-section-description" }, import_utils.locales.getText("auth.password.requirements.description")), /* @__PURE__ */ import_react.default.createElement("div", { className: "settings-item", style: { display: "flex", alignItems: "flex-start", gap: 32 } }, /* @__PURE__ */ import_react.default.createElement("div", { className: "settings-item-content", style: { flex: "0 0 240px" } }, /* @__PURE__ */ import_react.default.createElement("div", { className: "settings-item-title" }, import_utils.locales.getText("auth.password.min.length")), /* @__PURE__ */ import_react.default.createElement("div", { className: "settings-item-description" }, import_utils.locales.getText("auth.password.min.length.description"))), /* @__PURE__ */ import_react.default.createElement("div", { style: { flex: 1 } }, /* @__PURE__ */ import_react.default.createElement(
    import_antd.InputNumber,
    {
      min: 6,
      max: 20,
      value: settings.minLength,
      onChange: (value) => updateSettings({ minLength: value || 8 }),
      style: { width: "100%", maxWidth: 400 }
    }
  ))), /* @__PURE__ */ import_react.default.createElement("div", { className: "settings-item", style: { display: "flex", alignItems: "flex-start", gap: 32 } }, /* @__PURE__ */ import_react.default.createElement("div", { className: "settings-item-content", style: { flex: "0 0 240px" } }, /* @__PURE__ */ import_react.default.createElement("div", { className: "settings-item-title" }, import_utils.locales.getText("auth.password.requirements")), /* @__PURE__ */ import_react.default.createElement("div", { className: "settings-item-description" }, import_utils.locales.getText("auth.password.requirements.character"))), /* @__PURE__ */ import_react.default.createElement("div", { style: { flex: 1, display: "flex", flexDirection: "column", gap: 16 } }, /* @__PURE__ */ import_react.default.createElement(
    import_antd.Checkbox,
    {
      checked: settings.requireUppercase,
      onChange: (e) => updateSettings({ requireUppercase: e.target.checked })
    },
    /* @__PURE__ */ import_react.default.createElement("div", null, /* @__PURE__ */ import_react.default.createElement("div", { style: { fontWeight: 500, fontSize: "14px", color: "#262626" } }, import_utils.locales.getText("auth.password.require.uppercase")), /* @__PURE__ */ import_react.default.createElement("div", { style: { fontSize: "13px", color: "#8c8c8c" } }, import_utils.locales.getText("auth.password.require.uppercase.description")))
  ), /* @__PURE__ */ import_react.default.createElement(
    import_antd.Checkbox,
    {
      checked: settings.requireLowercase,
      onChange: (e) => updateSettings({ requireLowercase: e.target.checked })
    },
    /* @__PURE__ */ import_react.default.createElement("div", null, /* @__PURE__ */ import_react.default.createElement("div", { style: { fontWeight: 500, fontSize: "14px", color: "#262626" } }, import_utils.locales.getText("auth.password.require.lowercase")), /* @__PURE__ */ import_react.default.createElement("div", { style: { fontSize: "13px", color: "#8c8c8c" } }, import_utils.locales.getText("auth.password.require.lowercase.description")))
  ), /* @__PURE__ */ import_react.default.createElement(
    import_antd.Checkbox,
    {
      checked: settings.requireNumbers,
      onChange: (e) => updateSettings({ requireNumbers: e.target.checked })
    },
    /* @__PURE__ */ import_react.default.createElement("div", null, /* @__PURE__ */ import_react.default.createElement("div", { style: { fontWeight: 500, fontSize: "14px", color: "#262626" } }, import_utils.locales.getText("auth.password.require.numbers")), /* @__PURE__ */ import_react.default.createElement("div", { style: { fontSize: "13px", color: "#8c8c8c" } }, import_utils.locales.getText("auth.password.require.numbers.description")))
  ), /* @__PURE__ */ import_react.default.createElement(
    import_antd.Checkbox,
    {
      checked: settings.requireSpecialChars,
      onChange: (e) => updateSettings({ requireSpecialChars: e.target.checked })
    },
    /* @__PURE__ */ import_react.default.createElement("div", null, /* @__PURE__ */ import_react.default.createElement("div", { style: { fontWeight: 500, fontSize: "14px", color: "#262626" } }, import_utils.locales.getText("auth.password.require.special")), /* @__PURE__ */ import_react.default.createElement("div", { style: { fontSize: "13px", color: "#8c8c8c" } }, import_utils.locales.getText("auth.password.require.special.description")))
  ))));
};
var PasswordRulesSettingsContent_default = PasswordRulesSettingsContent;
