from typing import Any, List, Union, Optional, Iterator
from ._openxlsx import (
    XLDataValidationType,
    XLDataValidationOperator,
)

class DataValidation:
    def __init__(self, raw_dv: Any, worksheet: Optional[Any] = ...) -> None: ...
    @property
    def sqref(self) -> str: ...
    @sqref.setter
    def sqref(self, value: str) -> None: ...
    @property
    def type(self) -> XLDataValidationType: ...
    @type.setter
    def type(self, value: XLDataValidationType) -> None: ...
    @property
    def operator(self) -> XLDataValidationOperator: ...
    @operator.setter
    def operator(self, value: XLDataValidationOperator) -> None: ...
    @property
    def allow_blank(self) -> bool: ...
    @allow_blank.setter
    def allow_blank(self, value: bool) -> None: ...
    @property
    def show_drop_down(self) -> bool: ...
    @show_drop_down.setter
    def show_drop_down(self, value: bool) -> None: ...
    @property
    def show_input_message(self) -> bool: ...
    @show_input_message.setter
    def show_input_message(self, value: bool) -> None: ...
    @property
    def show_error_message(self) -> bool: ...
    @show_error_message.setter
    def show_error_message(self, value: bool) -> None: ...
    @property
    def formula1(self) -> str: ...
    @formula1.setter
    def formula1(self, value: str) -> None: ...
    @property
    def formula2(self) -> str: ...
    @formula2.setter
    def formula2(self, value: str) -> None: ...
    def set_prompt(self, title: str, message: str) -> None: ...
    def set_error(self, title: str, message: str, style: str = ...) -> None: ...
    def add_cell(self, cell_ref: str) -> None: ...
    def add_range(self, range_ref: str) -> None: ...
    def set_list(self, items: List[Any]) -> None: ...
    def set_reference_drop_list(self, sheet_name: str, range_ref: str) -> None: ...

class DataValidations:
    def __init__(self, raw_dvs: Any, worksheet: Optional[Any] = ...) -> None: ...
    def __len__(self) -> int: ...
    def __iter__(self) -> Iterator[DataValidation]: ...
    def __getitem__(self, index: Union[int, str]) -> DataValidation: ...
    def append(self) -> DataValidation: ...
    def add_validation(
        self,
        sqref: str,
        type: str = ...,
        operator: str = ...,
        formula1: str = ...,
        formula2: str = ...,
        **kwargs: Any,
    ) -> DataValidation: ...
    def remove(self, index_or_sqref: Union[int, str]) -> None: ...
    def clear(self) -> None: ...
