# Path: phial/errors.py
# class ArgumentTypeValidationError(ArgumentValidationError):
#     """Exception indicating argument type validation has failed."""
# 
#     pass
# 
# class ArgumentValidationError(Exception):
#     """Exception indicating argument validation has failed."""
# 
#     pass
# 
# Path: phial/wrappers.py
# class Message:
#     """
#     A representation of a Slack message.
# 
#     :param text: The message contents
#     :param channel: The Slack channel ID the message was sent from
#     :param user: The user who sent the message
#     :param timestamp: The message's timestamp
#     :param team: The Team ID of the Slack workspace the message was
#                  sent from
#     :param bot_id: If the message was sent by a bot
#                    the ID of that bot. Defaults to None.
#     """
# 
#     def __init__(
#         self,
#         text: str,
#         channel: str,
#         user: str,
#         timestamp: str,
#         team: Optional[str],
#         bot_id: Optional[str] = None,
#     ) -> None:
#         self.text = text
#         self.channel = channel
#         self.user = user
#         self.timestamp = timestamp
#         self.team = team
#         self.bot_id = bot_id
# 
#     def __repr__(self) -> str:
#         return "<Message: {0} in {1}:{2} at {3}>".format(
#             self.text, self.channel, self.team, self.timestamp
#         )
# 
#     def __eq__(self, other: object) -> bool:
#         return self.__dict__ == other.__dict__


import re
from inspect import Parameter, Signature, signature
from typing import Any, Callable, Dict, List, Optional
from phial.errors import ArgumentTypeValidationError, ArgumentValidationError
from phial.wrappers import Message
"""Helper utilities for phial."""



def validate_kwargs(func: Callable, kwargs: Dict[str, str]) -> Dict[str, Any]:
    """Validate kwargs match a functions signature."""
    func_params = signature(func).parameters
    validated_kwargs: Dict[str, Any] = {}
    for key in func_params.values():
        value = None
        if key.default is not Parameter.empty:
            value = key.default
        if value is None and key.name not in kwargs:

# Path: phial/errors.py
# class ArgumentTypeValidationError(ArgumentValidationError):
#     """Exception indicating argument type validation has failed."""
# 
#     pass
# 
# class ArgumentValidationError(Exception):
#     """Exception indicating argument validation has failed."""
# 
#     pass
# 
# Path: phial/wrappers.py
# class Message:
#     """
#     A representation of a Slack message.
# 
#     :param text: The message contents
#     :param channel: The Slack channel ID the message was sent from
#     :param user: The user who sent the message
#     :param timestamp: The message's timestamp
#     :param team: The Team ID of the Slack workspace the message was
#                  sent from
#     :param bot_id: If the message was sent by a bot
#                    the ID of that bot. Defaults to None.
#     """
# 
#     def __init__(
#         self,
#         text: str,
#         channel: str,
#         user: str,
#         timestamp: str,
#         team: Optional[str],
#         bot_id: Optional[str] = None,
#     ) -> None:
#         self.text = text
#         self.channel = channel
#         self.user = user
#         self.timestamp = timestamp
#         self.team = team
#         self.bot_id = bot_id
# 
#     def __repr__(self) -> str:
#         return "<Message: {0} in {1}:{2} at {3}>".format(
#             self.text, self.channel, self.team, self.timestamp
#         )
# 
#     def __eq__(self, other: object) -> bool:
#         return self.__dict__ == other.__dict__


# Path: phial/utils.py
import re
from inspect import Parameter, Signature, signature
from typing import Any, Callable, Dict, List, Optional
from phial.errors import ArgumentTypeValidationError, ArgumentValidationError
from phial.wrappers import Message

"""Helper utilities for phial."""



def validate_kwargs(func: Callable, kwargs: Dict[str, str]) -> Dict[str, Any]:
    """Validate kwargs match a functions signature."""
    func_params = signature(func).parameters
    validated_kwargs: Dict[str, Any] = {}
    for key in func_params.values():
        value = None
        if key.default is not Parameter.empty:
            value = key.default
        if value is None and key.name not in kwargs:

            raise ArgumentValidationError(