import type { AccessMode } from "@/lib/types";

interface AccessSettingsEditorProps {
  accessMode: AccessMode;
  accessPassword: string;
  onAccessModeChange: (mode: AccessMode) => void;
  onAccessPasswordChange: (pw: string) => void;
  label?: string;
  passwordLabel?: string;
  passwordHint?: string;
}

export function AccessSettingsEditor({
  accessMode,
  onAccessModeChange,
  label = "Access",
}: AccessSettingsEditorProps) {
  return (
    <div className="space-y-2">
      <div className="space-y-1.5">
        <label className="block text-xs font-medium text-zinc-400">{label}</label>
        <select
          value={accessMode}
          onChange={(e) => onAccessModeChange(e.target.value as AccessMode)}
          className="w-full rounded-md border border-zinc-700 bg-zinc-800 px-3 py-2 text-sm text-zinc-100 focus:border-zinc-500 focus:outline-none"
        >
          <option value="public">Public</option>
          <option value="private">Private</option>
        </select>
      </div>
    </div>
  );
}
