/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
import{a as i,b as n,c}from"./IHRGRUHQ.js";import{k as o}from"./KUVOINJC.js";async function d(r){let t="config"in r?n(r.config):r.chartType,a;if(!("layer"in r)&&!("iLayer"in r)&&"config"in r&&r.config.iLayer===void 0)throw new Error("The source is missing. You can provide it to createModel through either `iLayer`, `layer`, or by setting the `config.iLayer` property.");switch(t){case o.LineChart:{let{LineChartModel:e}=await import("./XDHPS7MS.js").then(m=>m.default.then(e=>({LineChartModel:e})));a=new e;break}case o.ComboBarLineChart:{let{ComboBarLineChartModel:e}=await import("./V7T7ZTSP.js").then(m=>m.default.then(e=>({ComboBarLineChartModel:e})));a=new e;break}case o.PieChart:{let{PieChartModel:e}=await import("./4TRQO24F.js").then(m=>m.default.then(e=>({PieChartModel:e})));a=new e;break}case o.Histogram:{let{HistogramModel:e}=await import("./7W5MYSIE.js").then(m=>m.default.then(e=>({HistogramModel:e})));a=new e;break}case o.Scatterplot:{let{ScatterplotModel:e}=await import("./GB5WAMYU.js").then(m=>m.default.then(e=>({ScatterplotModel:e})));a=new e;break}case o.BoxPlot:{let{BoxPlotModel:e}=await import("./TXXOCWGD.js").then(m=>m.default.then(e=>({BoxPlotModel:e})));a=new e;break}case o.Gauge:{let{GaugeModel:e}=await import("./MCPV7FZS.js").then(m=>m.default.then(e=>({GaugeModel:e})));a=new e;break}case o.RadarChart:{let{RadarChartModel:e}=await import("./6ZUCPSCT.js").then(m=>m.default.then(e=>({RadarChartModel:e})));a=new e;break}case o.HeatChart:{let{HeatChartModel:e}=await import("./VXEY3JXI.js").then(m=>m.default.then(e=>({HeatChartModel:e})));a=new e;break}case o.BarChart:default:{let{BarChartModel:e}=await import("./HZ76BBUP.js").then(m=>m.default.then(e=>({BarChartModel:e})));a=new e;break}}if(await a?.setup({layer:"layer"in r?r.layer:void 0,iLayer:"iLayer"in r?r.iLayer:void 0,config:"config"in r?r.config:void 0}),t!==void 0&&c(a,t))return a;{let e=i(a.chartType);throw new Error(`Please check the arguments provided to \`createModel\`. The generated model's type (\`${e}\`) does not match the type specified by either the \`chartType\` or the \`config\` argument (\`${t}\`).`)}}export{d as a};
