function resolveWidgetAssignmentReadScope(params) {
  const { auth, isSuperAdmin, queryTenantId, queryOrganizationId } = params;
  if (isSuperAdmin) {
    return {
      tenantId: (queryTenantId && queryTenantId.length ? queryTenantId : auth.tenantId) ?? null,
      organizationId: (queryOrganizationId && queryOrganizationId.length ? queryOrganizationId : auth.orgId) ?? null
    };
  }
  return {
    tenantId: auth.tenantId ?? null,
    organizationId: auth.orgId ?? null
  };
}
export {
  resolveWidgetAssignmentReadScope
};
//# sourceMappingURL=widgetAssignmentScope.js.map
