from .condition import Condition
from .air_quality import AirQuality

class CurrentCondition:
	def __init__(
		self,
		# condition,
		# air_quality,
		**kwargs,
	):
		self.last_updated = kwargs.get('last_updated', '')
		self.temp_c = float(kwargs.get('temp_c', 0))
		self.is_day = int(kwargs.get('is_day', 0))
		self.condition = Condition(**kwargs.get('condition'))
		self.wind_kph = float(kwargs.get('wind_kph', 0))
		self.wind_dir = kwargs.get('wind_dir', '')
		self.pressure_mb = float(kwargs.get('pressure_mb', 0))
		self.humidity = int(kwargs.get('humidity', 0))
		self.cloud = int(kwargs.get('cloud', 0))
		self.feelslike_c = float(kwargs.get('feelslike_c', 0))
		self.air_quality = AirQuality(**kwargs.get('air_quality'))

	def __repr__(self):
		return f'CurrentCondition(condition={self.condition}, air_quality={self.air_quality}, last_updated={self.last_updated}, temp_c={self.temp_c}, wind_dir={self.wind_dir}, wind_kph={self.wind_kph})'
