//#region src/plugins/provider-auth-mode.ts
async function resolveSecretInputModeForEnvSelection(params) {
	if (params.explicitMode) return params.explicitMode;
	if (typeof params.prompter.select !== "function") return "plaintext";
	return await params.prompter.select({
		message: params.copy?.modeMessage ?? "你想如何提供此 API 密钥？",
		initialValue: "plaintext",
		options: [{
			value: "plaintext",
			label: params.copy?.plaintextLabel ?? "直接粘贴 API 密钥",
			hint: params.copy?.plaintextHint ?? "将密钥直接存储在 OpenClaw 配置中"
		}, {
			value: "ref",
			label: params.copy?.refLabel ?? "使用外部密钥提供商",
			hint: params.copy?.refHint ?? "Stores a reference to env or configured external secret providers"
		}]
	}) === "ref" ? "ref" : "plaintext";
}
//#endregion
export { resolveSecretInputModeForEnvSelection as t };
