from dataclasses import dataclass
from typing import TYPE_CHECKING

if TYPE_CHECKING:
    from ..context import ParsingContext


@dataclass
class FogSettings:
    asset_name = "FogSettings"

    version: int
    unknown: int
    start_pos: int
    end_pos: int

    @classmethod
    def parse(cls, context: "ParsingContext"):
        with context.read_asset() as asset_ctx:
            unknown = context.stream.readUInt32()

        return cls(version=asset_ctx.version, unknown=unknown, start_pos=asset_ctx.start_pos, end_pos=asset_ctx.end_pos)
