import{ArgumentError as e}from"../../ArgumentError.js";import{ArcGISRelationship as i}from"../../tasks/query/ArcGISRelationship.js";import{QueryBasedRelationship as r}from"../../tasks/query/QueryBasedRelationship.js";import{checkArg as t}from"../../utilities/checkArg.js";export class DefaultRelationshipFactory{static instance=new DefaultRelationshipFactory;create(s){switch(t("properties",s).isNotMissing(),t("properties.$relationshipType",s.$relationshipType).isNotMissing(),s.$relationshipType){case"QueryBasedRelationship":return new r(s);case"ArcGISRelationship":return new i(s)}throw new e("properties.$relationshipType","Unsupported relationship type.")}}