o
    ûÐ,hj  ã                   @   s"   d dl mZ G dd„ dejƒZdS )é   )Ú	xmlwriterc                       s`   e Zd ZdZ‡ fdd„Zdd„ Zdd„ Zdd	„ Zd
d„ Zdd„ Z	dd„ Z
dd„ Zdd„ Z‡  ZS )ÚFeaturePropertyBagzG
    A class for writing the Excel XLSX FeaturePropertyBag file.


    c                    s   t ƒ  ¡  tƒ | _dS )z
        Constructor.

        N)ÚsuperÚ__init__ÚsetÚfeature_property_bags©Úself©Ú	__class__© úU/var/www/html/rh/venv/lib/python3.10/site-packages/xlsxwriter/feature_property_bag.pyr      s   
zFeaturePropertyBag.__init__c                 C   sX   |   ¡  |  ¡  |  ¡  |  ¡  |  ¡  |  ¡  d| jv r!|  ¡  |  d¡ |  	¡  d S )NÚDXFComplementsÚFeaturePropertyBags)
Ú_xml_declarationÚ_write_feature_property_bagsÚ_write_checkbox_bagÚ_write_xf_control_bagÚ_write_xf_compliment_bagÚ_write_xf_compliments_bagr   Ú_write_dxf_compliments_bagÚ_xml_end_tagÚ
_xml_closer   r   r   r   Ú_assemble_xml_file,   s   

z%FeaturePropertyBag._assemble_xml_filec                 C   s   d}d|fg}|   d|¡ d S )NzIhttp://schemas.microsoft.com/office/spreadsheetml/2022/featurepropertybagÚxmlnsr   )Ú_xml_start_tag)r	   r   Ú
attributesr   r   r   r   P   s   ÿ
z/FeaturePropertyBag._write_feature_property_bagsc                 C   s   dg}|   d|¡ d S )N)ÚtypeÚCheckboxÚbag)Ú_xml_empty_tag©r	   r   r   r   r   r   [   s   z&FeaturePropertyBag._write_checkbox_bagc                 C   ó,   dg}|   d|¡ |  dd¡ |  d¡ d S )N)r   Ú
XFControlsr   ÚCellControlé    ©r   Ú_write_bag_idr   r!   r   r   r   r   a   ó   z(FeaturePropertyBag._write_xf_control_bagc                 C   r"   )N)r   ÚXFComplementr   r#   r   r&   r!   r   r   r   r   l   r(   z+FeaturePropertyBag._write_xf_compliment_bagc                 C   óF   ddg}|   d|¡ |   ddg¡ |  dd¡ |  d¡ |  d¡ d S )N)r   ÚXFComplements)ÚextRefÚXFComplementsMapperExtRefr   Úa©ÚkÚMappedFeaturePropertyBagsÚ é   r&   r!   r   r   r   r   w   ó   þ
z,FeaturePropertyBag._write_xf_compliments_bagc                 C   r*   )N)r   r   )r,   ÚDXFComplementsMapperExtRefr   r.   r/   r2   r3   r&   r!   r   r   r   r   †   r4   z-FeaturePropertyBag._write_dxf_compliments_bagc                 C   s$   g }|r	d|fg}|   d||¡ d S )Nr0   ÚbagId)Ú_xml_data_element)r	   ÚkeyÚbag_idr   r   r   r   r'   •   s   
z FeaturePropertyBag._write_bag_id)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r   r   r   r   r'   Ú__classcell__r   r   r
   r   r      s    $r   N)r2   r   Ú	XMLwriterr   r   r   r   r   Ú<module>   s   