import{checkArg as o}from"../utilities/checkArg.js";import{fromEsriApiSymbol as l,toEsriApiSymbol as y}from"./Symbol.js";import{ERR_LAYER_TYPE_MISMATCH as e,applyLayerBaseToEsriApiLayer as r,applyOperationalLayerToEsriApiLayer as n,fromEsriApiLayerToLayerBase as i,fromEsriApiLayerToOperationalLayer as s}from"./_layerHelper.js";export var GeoRSSLayer;!function(a){async function t(l,i){o("layerJson",l).isNotMissing(),o("layerJson.layerType",l.layerType).satisfies((o=>!o||"GeoRSS"===o),e),o("layer",i).isNotMissing(),r(l,i),n(l,i),l.hasOwnProperty("lineSymbol")&&null!=l.lineSymbol&&(i.lineSymbol=y(l.lineSymbol)),l.hasOwnProperty("pointSymbol")&&null!=l.pointSymbol&&(i.pointSymbol=y(l.pointSymbol)),l.hasOwnProperty("polygonSymbol")&&null!=l.polygonSymbol&&(i.polygonSymbol=y(l.polygonSymbol)),l.hasOwnProperty("url")&&(i.url=l.url)}a.toEsriApiLayer=async function(l){o("layerJson",l).isNotMissing(),o("layerJson.layerType",l.layerType).satisfies((o=>!o||"GeoRSS"===o),e);const y=new((await import("@arcgis/core/layers/GeoRSSLayer")).default);return await t(l,y),y},a.applyToEsriApiLayer=t,a.fromEsriApiLayer=function(y){o("layer",y).isNotMissing();const e={...i(y),...s(y),layerType:"GeoRSS"};return y.lineSymbol&&(e.lineSymbol=l(y.lineSymbol)),y.pointSymbol&&(e.pointSymbol=l(y.pointSymbol)),y.polygonSymbol&&(e.polygonSymbol=l(y.polygonSymbol)),y.url&&(e.url=y.url),e}}(GeoRSSLayer||(GeoRSSLayer={}));