o
    ]i                     @   s&   d dl mZmZmZ G dd dZdS )    )AnyDictOptionalc                   @   sv   e Zd ZdZdddZdefddZdefdd	Zdefd
dZde	e
ef fddZdefddZde
fddZdS )
ChartTitlez
    A class to represent an Excel chart title.

    This class encapsulates all title related properties and methods for the
    chart title and axis titles.
    returnNc                 C   sF   d| _ d| _d| _d| _d| _d| _d| _d| _d| _d| _	d| _
dS )z3
        Initialize a ChartTitle instance.
        NF)fontnameformuladata_idlayoutoverlayhiddenlinefillpatterngradientself r   [/var/www/html/stock_analysis/be/venv/lib/python3.10/site-packages/xlsxwriter/chart_title.py__init__   s   
zChartTitle.__init__c                 C   s   | j duo	| j dkS )zr
        Check if the title has a text name set.

        Returns:
            True if name has been set.
        N )r   r   r   r   r   has_name%   s   zChartTitle.has_namec                 C   s
   | j duS )zs
        Check if the title has a formula set.

        Returns:
            True if formula has been set.
        N)r	   r   r   r   r   has_formula.   s   
zChartTitle.has_formulac                 C   sL   | j duo| j dd}| jduo| jdd}| j}| j}|p%|p%|p%|S )z
        Check if the title has any formatting properties set.

        Returns:
            True if the title has line, fill, pattern, or gradient formatting.
        NdefinedF)r   getr   r   r   )r   has_linehas_fillhas_patternhas_gradientr   r   r   has_formatting7   s
   zChartTitle.has_formattingc                 C   s   | j | j| j| jdS )z
        Get a dictionary containing the formatting properties.

        Returns:
            A dictionary with line, fill, pattern, and gradient properties.
        r   r   r   r   r!   r   r   r   r   get_formattingE   s
   zChartTitle.get_formattingc                 C   s   | j S )zq
        Check if the title is explicitly hidden.

        Returns:
            True if title is hidden.
        )r   r   r   r   r   	is_hiddenS   s   zChartTitle.is_hiddenc                 C   s`   d| j d| jd| jd| jd| jd| jd| jd| jd	| jd
| j	d| 
 dS )zC
        Return a string representation of the ChartTitle.
        zChartTitle(
    name = z,
    formula = z,
    hidden = z,
    font = z,
    line = z,
    fill = z,
    pattern = z,
    gradient = z,
    layout = z,
    overlay = z,
    has_formatting = z,
)
)r   r	   r   r   r   r   r   r   r   r   r    r   r   r   r   __repr__\   s0   	
zChartTitle.__repr__)r   N)__name__
__module____qualname____doc__r   boolr   r   r    r   strr   r"   r#   r$   r   r   r   r   r      s    
			r   N)typingr   r   r   r   r   r   r   r   <module>   s   	