// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See http://js.arcgis.com/3.23/esri/copyright.txt for details.
//>>built
define("esri/dijit/geoenrichment/ReportPlayer/dataProviders/supportClasses/stdGeographies/StdGeographiesModel",["dojo/_base/declare","dojo/i18n!../../../../../../nls/jsapi"],function(d,c){c=c.geoenrichment.dijit.ReportPlayer.ReportPlayer;return d(null,{countryID:null,hierarchyID:null,_levelsCache:null,_levels:null,_countryLevel:null,constructor:function(b,a,c){this.countryID=b;this.hierarchyID=a;this._levelsCache={};this._initParseData(c)},_initParseData:function(b){this._levels=b.geographyLevels[0].hierarchies[0].levels;
this._levels.forEach(function(a){this._levelsCache[a.id]=a;a.adminLevel&&(this._levelsCache[a.adminLevel]=a);a.isWholeCountry&&(this._countryLevel=a)},this)},getLevels:function(b){return b?this._levels.filter(function(a){return!a.isWholeCountry}):this._levels.slice()},getLevel:function(b){return this._levelsCache[b]},getLevelPluralName:function(b){var a=this.getLevel(b);return a?a.isWholeCountry?c.wholeCountry:this.getLevel(b).pluralName:null},getCountryLevel:function(){return this._countryLevel}})});