import{checkArg as e}from"../utilities/checkArg.js";export var WMSSublayer;!function(n){async function i(n,i){e("layerJson",n).isNotMissing(),e("sublayer",i).isNotMissing(),n.hasOwnProperty("name")&&null!=n.name&&(i.name=n.name),n.hasOwnProperty("showPopup")&&null!=n.showPopup&&(i.popupEnabled=n.showPopup),n.hasOwnProperty("title")&&(i.title=n.title)}n.toEsriApiWMSSublayer=async function(n){e("layerJson",n).isNotMissing();const o=new((await import("@arcgis/core/layers/support/WMSSublayer")).default);return await i(n,o),o},n.applyToEsriApiWMSSublayer=i,n.fromEsriApiWMSSublayer=function(n){e("sublayer",n).isNotMissing();const i={};return n.name&&(i.name=n.name),null!==n.popupEnabled&&void 0!==n.popupEnabled&&(i.showPopup=n.popupEnabled),n.title&&(i.title=n.title),i}}(WMSSublayer||(WMSSublayer={}));