import{ArgumentError as e}from"../../ArgumentError.js";import{checkArg as t}from"../../utilities/checkArg.js";import{isFeatureLayer as r}from"../../utilities/layers.js";import{isPlainObject as i}from"../../utilities/object.js";import{ArcGISServiceTableExtension as o}from"../ArcGISServiceTableExtension.js";export class DefaultTableExtensionFactory{static instance=new DefaultTableExtensionFactory;create(s){if(t("properties",s).isNotMissing(),t("properties.table",s.table).isNotMissing(),r(s.table))return new o(s);if(i(s.table))return new o(s);throw new e("properties.table","Unable to determine correct type of table extension to create.")}}