# -*- coding: utf-8 -*-
'''
    Copyright (C) 2020 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
'''

try:
	from dataclasses import dataclass
	
	@dataclass
	class TileConfig:
		cache_path: str
		sizes: Array[int]
		densities: Array[int]
		densitiy_base: int
		points_age_max: int
		zoom_range: Array[int]
		raster_file_size_max: [int]
		skip_empty: bool
		
except ImportError:
	class TileConfig:
		"""
			Workaround for @dataclass, until python 3.7 is available in main distros
		"""
		def __init__(self, cache_path, sizes, densities, densitiy_base, points_age_max, zoom_range, raster_file_size_max, skip_empty):
			self.cache_path = cache_path
			self.sizes = sizes
			self.densities = densities
			self.densitiy_base = densitiy_base
			self.points_age_max = points_age_max
			self.zoom_range = zoom_range
			self.raster_file_size_max = raster_file_size_max
			self.skip_empty = skip_empty
