# Path: ipuz/structures/common.py
# def validate_dimensions(field_name, field_data):
#     if not isinstance(field_data, dict):
#         raise IPUZException("Invalid {} value found".format(field_name))
#     for key, value in field_data.items():
#         if key not in ("width", "height"):
#             raise IPUZException("Invalid {} value found".format(field_name))
#     for key in ["width", "height"]:
#         if key not in field_data:
#             raise IPUZException(
#                 "Mandatory field {} of dimensions is missing".format(key)
#             )
#         if type(field_data[key]) is not int:
#             raise IPUZException(
#                 "Invalid {} value in dimensions field found".format(key)
#             )
#         if field_data[key] < 1:
#             raise IPUZException(
#                 "Field {} of dimensions is less than one".format(key)
#             )
# 
# Path: ipuz/structures/groupspec.py
# def validate_groupspec_dict(field_name, field_data):
#     if not isinstance(field_data, dict):
#         raise IPUZException("Invalid {} value found".format(field_name))
#     for key, value in field_data.items():
#         validate_string(field_name, key)
#         if not key:
#             raise IPUZException("Invalid {} value found".format(field_name))
#         if not validate_groupspec(value):
#             raise IPUZException("Invalid {} value found".format(field_name))
# 
# Path: ipuz/structures/styledcell.py
# def validate_styledcell(field_data):
#     if (field_data is not None and
#             type(field_data) not in [int, dict] and
#             not isinstance(field_data, str)):
#         return False
#     if isinstance(field_data, dict):
#         if not field_data:
#             return False
#         if not all(key in ("cell", "style") for key in field_data):
#             return False
#         if ("cell" in field_data and
#                 field_data["cell"] is not None and
#                 type(field_data["cell"]) is not int and
#                 not isinstance(field_data["cell"], str)):
#             return False
#         if "style" in field_data:
#             try:
#                 validate_stylespec(field_data["style"])
#             except IPUZException:
#                 return False
#     return True
# 
# Path: ipuz/validators.py
# def validate_bool(field_name, field_data):
#     if not isinstance(field_data, bool):
#         raise IPUZException("Invalid {} value found".format(field_name))
# 
# def validate_list_of_lists(
#     field_name, field_data, element_name, validate_element
# ):
#     if (not isinstance(field_data, list) or
#             any(not isinstance(e, list) for e in field_data)):
#         raise IPUZException("Invalid {} value found".format(field_name))
#     for line in field_data:
#         for element in line:
#             if not validate_element(element):
#                 message = "Invalid {} in {} element found".format(
#                     element_name, field_name
#                 )
#                 raise IPUZException(message)


from ipuz.structures import (
    validate_dimensions,
    validate_groupspec_dict,
    validate_styledcell,
)
from ipuz.validators import (
    validate_bool,
    validate_list_of_lists,
)


IPUZ_BLOCK_VALIDATORS = {
    "dimensions": validate_dimensions,
    "slide": validate_bool,

# Path: ipuz/structures/common.py
# def validate_dimensions(field_name, field_data):
#     if not isinstance(field_data, dict):
#         raise IPUZException("Invalid {} value found".format(field_name))
#     for key, value in field_data.items():
#         if key not in ("width", "height"):
#             raise IPUZException("Invalid {} value found".format(field_name))
#     for key in ["width", "height"]:
#         if key not in field_data:
#             raise IPUZException(
#                 "Mandatory field {} of dimensions is missing".format(key)
#             )
#         if type(field_data[key]) is not int:
#             raise IPUZException(
#                 "Invalid {} value in dimensions field found".format(key)
#             )
#         if field_data[key] < 1:
#             raise IPUZException(
#                 "Field {} of dimensions is less than one".format(key)
#             )
# 
# Path: ipuz/structures/groupspec.py
# def validate_groupspec_dict(field_name, field_data):
#     if not isinstance(field_data, dict):
#         raise IPUZException("Invalid {} value found".format(field_name))
#     for key, value in field_data.items():
#         validate_string(field_name, key)
#         if not key:
#             raise IPUZException("Invalid {} value found".format(field_name))
#         if not validate_groupspec(value):
#             raise IPUZException("Invalid {} value found".format(field_name))
# 
# Path: ipuz/structures/styledcell.py
# def validate_styledcell(field_data):
#     if (field_data is not None and
#             type(field_data) not in [int, dict] and
#             not isinstance(field_data, str)):
#         return False
#     if isinstance(field_data, dict):
#         if not field_data:
#             return False
#         if not all(key in ("cell", "style") for key in field_data):
#             return False
#         if ("cell" in field_data and
#                 field_data["cell"] is not None and
#                 type(field_data["cell"]) is not int and
#                 not isinstance(field_data["cell"], str)):
#             return False
#         if "style" in field_data:
#             try:
#                 validate_stylespec(field_data["style"])
#             except IPUZException:
#                 return False
#     return True
# 
# Path: ipuz/validators.py
# def validate_bool(field_name, field_data):
#     if not isinstance(field_data, bool):
#         raise IPUZException("Invalid {} value found".format(field_name))
# 
# def validate_list_of_lists(
#     field_name, field_data, element_name, validate_element
# ):
#     if (not isinstance(field_data, list) or
#             any(not isinstance(e, list) for e in field_data)):
#         raise IPUZException("Invalid {} value found".format(field_name))
#     for line in field_data:
#         for element in line:
#             if not validate_element(element):
#                 message = "Invalid {} in {} element found".format(
#                     element_name, field_name
#                 )
#                 raise IPUZException(message)


# Path: ipuz/puzzlekinds/block.py
from ipuz.structures import (
    validate_dimensions,
    validate_groupspec_dict,
    validate_styledcell,
)
from ipuz.validators import (
    validate_bool,
    validate_list_of_lists,
)



IPUZ_BLOCK_VALIDATORS = {
    "dimensions": validate_dimensions,
    "slide": validate_bool,

    "move": validate_bool,