def __init__(self, router_data: dict | None = None):
        """Initialize the HeaderData object based on router_data.

        Args:
            router_data: the router_data dict.
        """
        super().__init__()
        if router_data:
            fields_names = [f.name for f in dataclasses.fields(self)]
            for k, v in router_data.get(constants.RouteVar.HEADERS, {}).items():
                snake_case_key = format.to_snake_case(k)
                if snake_case_key in fields_names:
                    object.__setattr__(self, snake_case_key, v)
            object.__setattr__(
                self,
                "raw_headers",
                _FrozenDictStrStr(
                    **{
                        k: v
                        for k, v in router_data.get(
                            constants.RouteVar.HEADERS, {}
                        ).items()
                        if v
                    }
                ),
            )
Initialize the HeaderData object based on router_data.

        Args:
            router_data: the router_data dict.
        
reflex/istate/data.py