import { findOneWithDecryption } from "@open-mercato/shared/lib/encryption/find";
async function isOwnedCompanyEntity(em, customerEntityId, scope) {
  const { CustomerEntity } = await import("@open-mercato/core/modules/customers/data/entities");
  const entity = await findOneWithDecryption(
    em,
    CustomerEntity,
    {
      id: customerEntityId,
      tenantId: scope.tenantId,
      organizationId: scope.organizationId,
      kind: "company",
      deletedAt: null
    },
    void 0,
    { tenantId: scope.tenantId, organizationId: scope.organizationId }
  );
  return !!entity;
}
export {
  isOwnedCompanyEntity
};
//# sourceMappingURL=customerEntityOwnership.js.map
