//#region extensions/feishu/src/status/status-adapter.ts
function createFeishuStatusAdapter() {
	return {
		defaultRuntime: {
			accountId: "default",
			channelId: "feishu",
			enabled: true,
			configured: false
		},
		buildAccountSnapshot: async ({ account }) => ({
			accountId: account.accountId,
			channelId: "feishu",
			enabled: account.enabled,
			configured: account.configured,
			status: account.configured ? "online" : "unconfigured"
		}),
		resolveAccountState: ({ configured, enabled }) => {
			if (!enabled) return "disabled";
			if (!configured) return "error";
			return "online";
		},
		probeAccount: async ({ account, timeoutMs, cfg }) => {
			return {
				ok: account.configured,
				timeoutMs,
				domain: account.domain,
				mode: account.connectionMode,
				enabled: account.enabled,
				configured: account.configured,
				hasConfig: Boolean((cfg.channels?.feishu)?.enabled)
			};
		},
		buildChannelSummary: async ({ snapshot }) => ({
			ok: snapshot.configured && snapshot.enabled,
			accountId: snapshot.accountId,
			enabled: snapshot.enabled,
			configured: snapshot.configured,
			status: snapshot.status
		})
	};
}
//#endregion
export { createFeishuStatusAdapter };

//# sourceMappingURL=status-adapter.js.map