async function customerPersonCompanyLinksSupportDeletedAt(_em) {
  return true;
}
function warnMissingCustomerPersonCompanyLinksDeletedAt(_source) {
}
async function withActiveCustomerPersonCompanyLinkFilter(_em, where, _source) {
  return { ...where, deletedAt: null };
}
function filterActivePersonCompanyLinks(links) {
  if (!Array.isArray(links)) return [];
  return links.filter((entry) => entry?.deletedAt == null);
}
function withCustomerPersonCompanyLinkScope(where, scope) {
  const scoped = { ...where };
  if (scope.tenantId) scoped.tenantId = scope.tenantId;
  if (scope.organizationId) scoped.organizationId = scope.organizationId;
  return scoped;
}
function withScopedCustomerDealLinkWhere(dealId, scope) {
  const deal = { id: dealId };
  if (scope.tenantId) deal.tenantId = scope.tenantId;
  if (scope.organizationId) deal.organizationId = scope.organizationId;
  return { deal };
}
export {
  customerPersonCompanyLinksSupportDeletedAt,
  filterActivePersonCompanyLinks,
  warnMissingCustomerPersonCompanyLinksDeletedAt,
  withActiveCustomerPersonCompanyLinkFilter,
  withCustomerPersonCompanyLinkScope,
  withScopedCustomerDealLinkWhere
};
//# sourceMappingURL=personCompanyLinkTable.js.map
