import { i as NodmixConfig } from "./types.nodmix-Dph4_Y30.js";
import { i as ChannelApprovalCapability } from "./types.adapters-Dov1csrR.js";
import { s as ExecApprovalRequest } from "./exec-approvals-CPpcfY0H.js";
import { s as PluginApprovalRequest } from "./plugin-approvals-BT7-U8LU.js";
//#region src/plugin-sdk/approval-delivery-helpers.d.ts
type ApprovalKind = "exec" | "plugin";
type NativeApprovalDeliveryMode = "dm" | "channel" | "both";
type NativeApprovalRequest = ExecApprovalRequest | PluginApprovalRequest;
type NativeApprovalTarget = {
  to: string;
  threadId?: string | number | null;
};
type ChannelApprovalCapabilitySurfaces = Pick<ChannelApprovalCapability, "delivery" | "nativeRuntime" | "render" | "native">;
type ApprovalAdapterParams = {
  cfg: NodmixConfig;
  accountId?: string | null;
  senderId?: string | null;
};
type DeliverySuppressionParams = {
  cfg: NodmixConfig;
  approvalKind: ApprovalKind;
  target: {
    channel: string;
    accountId?: string | null;
  };
  request: {
    request: {
      turnSourceChannel?: string | null;
      turnSourceAccountId?: string | null;
    };
  };
};
type ApproverRestrictedNativeApprovalParams = {
  channel: string;
  channelLabel: string;
  listAccountIds: (cfg: NodmixConfig) => string[];
  hasApprovers: (params: ApprovalAdapterParams) => boolean;
  isExecAuthorizedSender: (params: ApprovalAdapterParams) => boolean;
  isPluginAuthorizedSender?: (params: ApprovalAdapterParams) => boolean;
  isNativeDeliveryEnabled: (params: {
    cfg: NodmixConfig;
    accountId?: string | null;
  }) => boolean;
  resolveNativeDeliveryMode: (params: {
    cfg: NodmixConfig;
    accountId?: string | null;
  }) => NativeApprovalDeliveryMode;
  requireMatchingTurnSourceChannel?: boolean;
  resolveSuppressionAccountId?: (params: DeliverySuppressionParams) => string | undefined;
  resolveOriginTarget?: (params: {
    cfg: NodmixConfig;
    accountId?: string | null;
    approvalKind: ApprovalKind;
    request: NativeApprovalRequest;
  }) => NativeApprovalTarget | null | Promise<NativeApprovalTarget | null>;
  resolveApproverDmTargets?: (params: {
    cfg: NodmixConfig;
    accountId?: string | null;
    approvalKind: ApprovalKind;
    request: NativeApprovalRequest;
  }) => NativeApprovalTarget[] | Promise<NativeApprovalTarget[]>;
  notifyOriginWhenDmOnly?: boolean;
  nativeRuntime?: ChannelApprovalCapability["nativeRuntime"];
  describeExecApprovalSetup?: ChannelApprovalCapability["describeExecApprovalSetup"];
};
declare function createApproverRestrictedNativeApprovalAdapter(params: ApproverRestrictedNativeApprovalParams): {
  auth: {
    authorizeActorAction?: ChannelApprovalCapability["authorizeActorAction"];
    getActionAvailabilityState?: ChannelApprovalCapability["getActionAvailabilityState"];
    getExecInitiatingSurfaceState?: ChannelApprovalCapability["getExecInitiatingSurfaceState"];
    resolveApproveCommandBehavior?: ChannelApprovalCapability["resolveApproveCommandBehavior"];
  };
  delivery: ChannelApprovalCapability["delivery"];
  nativeRuntime: ChannelApprovalCapability["nativeRuntime"];
  render: ChannelApprovalCapability["render"];
  native: ChannelApprovalCapability["native"];
  describeExecApprovalSetup: ChannelApprovalCapability["describeExecApprovalSetup"];
};
declare function createChannelApprovalCapability(params: {
  authorizeActorAction?: ChannelApprovalCapability["authorizeActorAction"];
  getActionAvailabilityState?: ChannelApprovalCapability["getActionAvailabilityState"];
  getExecInitiatingSurfaceState?: ChannelApprovalCapability["getExecInitiatingSurfaceState"];
  resolveApproveCommandBehavior?: ChannelApprovalCapability["resolveApproveCommandBehavior"];
  describeExecApprovalSetup?: ChannelApprovalCapability["describeExecApprovalSetup"];
  delivery?: ChannelApprovalCapability["delivery"];
  nativeRuntime?: ChannelApprovalCapability["nativeRuntime"];
  render?: ChannelApprovalCapability["render"];
  native?: ChannelApprovalCapability["native"]; /** @deprecated Pass delivery/nativeRuntime/render/native directly. */
  approvals?: Partial<ChannelApprovalCapabilitySurfaces>;
}): ChannelApprovalCapability;
declare function splitChannelApprovalCapability(capability: ChannelApprovalCapability): {
  auth: {
    authorizeActorAction?: ChannelApprovalCapability["authorizeActorAction"];
    getActionAvailabilityState?: ChannelApprovalCapability["getActionAvailabilityState"];
    getExecInitiatingSurfaceState?: ChannelApprovalCapability["getExecInitiatingSurfaceState"];
    resolveApproveCommandBehavior?: ChannelApprovalCapability["resolveApproveCommandBehavior"];
  };
  delivery: ChannelApprovalCapability["delivery"];
  nativeRuntime: ChannelApprovalCapability["nativeRuntime"];
  render: ChannelApprovalCapability["render"];
  native: ChannelApprovalCapability["native"];
  describeExecApprovalSetup: ChannelApprovalCapability["describeExecApprovalSetup"];
};
declare function createApproverRestrictedNativeApprovalCapability(params: ApproverRestrictedNativeApprovalParams): ChannelApprovalCapability;
//#endregion
export { splitChannelApprovalCapability as i, createApproverRestrictedNativeApprovalCapability as n, createChannelApprovalCapability as r, createApproverRestrictedNativeApprovalAdapter as t };