from typing import Optional, Union
from ._openxlsx import (
    XLColor,
    XLPatternType,
    XLLineStyle,
    XLAlignmentStyle,
)

class Font:
    def __init__(
        self,
        name: str = "Arial",
        size: int = 11,
        bold: bool = False,
        italic: bool = False,
        color: Optional[Union[str, XLColor]] = None,
    ) -> None: ...
    def name(self) -> str: ...
    def set_name(self, value: str) -> None: ...
    def size(self) -> int: ...
    def set_size(self, value: int) -> None: ...
    def bold(self) -> bool: ...
    def set_bold(self, value: bool) -> None: ...
    def italic(self) -> bool: ...
    def set_italic(self, value: bool) -> None: ...
    def color(self) -> XLColor: ...
    def set_color(self, value: Union[str, XLColor]) -> None: ...

class Fill:
    def __init__(
        self,
        pattern_type: Union[XLPatternType, int, str] = ...,
        color: Optional[Union[str, XLColor]] = None,
        background_color: Optional[Union[str, XLColor]] = None,
    ) -> None: ...
    def pattern_type(self) -> XLPatternType: ...
    def set_pattern_type(self, value: Union[XLPatternType, int]) -> None: ...
    def color(self) -> Optional[XLColor]: ...
    def set_color(self, value: Union[str, XLColor]) -> None: ...
    def background_color(self) -> Optional[XLColor]: ...
    def set_background_color(self, value: Union[str, XLColor]) -> None: ...

class Alignment:
    def __init__(
        self,
        horizontal: Optional[Union[XLAlignmentStyle, int, str]] = None,
        vertical: Optional[Union[XLAlignmentStyle, int, str]] = None,
        wrap_text: bool = False,
    ) -> None: ...
    def horizontal(self) -> Optional[XLAlignmentStyle]: ...
    def set_horizontal(self, value: Union[XLAlignmentStyle, int]) -> None: ...
    def vertical(self) -> Optional[XLAlignmentStyle]: ...
    def set_vertical(self, value: Union[XLAlignmentStyle, int]) -> None: ...
    def wrap_text(self) -> bool: ...
    def set_wrap_text(self, value: bool) -> None: ...

def is_date_format(c_format: Union[int, str, None]) -> bool: ...
def _get_line_style(style: Union[XLLineStyle, int, str]) -> XLLineStyle: ...

class Side:
    def __init__(
        self,
        style: Union[XLLineStyle, int, str] = ...,
        color: Optional[Union[str, XLColor]] = None,
    ) -> None: ...
    def style(self) -> XLLineStyle: ...
    def color(self) -> XLColor: ...

class Border:
    def __init__(
        self,
        left: Optional[Union[Side, XLLineStyle, int, str]] = None,
        right: Optional[Union[Side, XLLineStyle, int, str]] = None,
        top: Optional[Union[Side, XLLineStyle, int, str]] = None,
        bottom: Optional[Union[Side, XLLineStyle, int, str]] = None,
        diagonal: Optional[Union[Side, XLLineStyle, int, str]] = None,
        outline: Optional[Union[Side, XLLineStyle, int, str]] = None,
    ) -> None: ...
    def left(self) -> Side: ...
    def right(self) -> Side: ...
    def top(self) -> Side: ...
    def bottom(self) -> Side: ...
    def diagonal(self) -> Side: ...
    def set_left(self, style: Union[XLLineStyle, int], color: XLColor) -> None: ...
    def set_right(self, style: Union[XLLineStyle, int], color: XLColor) -> None: ...
    def set_top(self, style: Union[XLLineStyle, int], color: XLColor) -> None: ...
    def set_bottom(self, style: Union[XLLineStyle, int], color: XLColor) -> None: ...
    def set_diagonal(self, style: Union[XLLineStyle, int], color: XLColor) -> None: ...

class Protection:
    def __init__(self, locked: bool = True, hidden: bool = False) -> None: ...
    locked: bool
    hidden: bool

class Style:
    def __init__(
        self,
        font: Optional[Font] = None,
        fill: Optional[Fill] = None,
        border: Optional[Border] = None,
        alignment: Optional[Alignment] = None,
        number_format: Optional[Union[str, int]] = None,
        protection: Optional[Protection] = None,
    ) -> None: ...
    font: Optional[Font]
    fill: Optional[Fill]
    border: Optional[Border]
    alignment: Optional[Alignment]
    number_format: Optional[Union[str, int]]
    protection: Optional[Protection]
    style_index: int
    def __int__(self) -> int: ...
