o
    Z2h                     @  s|   d Z ddlmZ ddlZddlmZ ddlmZ ddl	m
Z
 ddlmZ er,ddlmZ G d	d
 d
eZG dd deZdS )zHeader and footer part objects.    )annotationsN)TYPE_CHECKING)CONTENT_TYPE)	parse_xml)	StoryPart)Packagec                   @  *   e Zd ZdZed	ddZedd ZdS )

FooterPartzDefinition of a section footer.packager   c                 C  *   | d}tj}t|  }| ||||S )z!Return newly created footer part.z/word/footer%d.xml)next_partnameCT
WML_FOOTERr   _default_footer_xmlclsr
   partnamecontent_typeelement r   b/home/skpark/git/infrasmart_work/infrasmart/venv/lib/python3.10/site-packages/docx/parts/hdrftr.pynew      
zFooterPart.newc                 C  V   t jt jtd ddd}t|d}| }W d   |S 1 s$w   Y  |S )z6Return bytes containing XML for a default footer part.r   ..	templateszdefault-footer.xmlrbNospathjoinsplit__file__openreadr   r   f	xml_bytesr   r   r   r         

zFooterPart._default_footer_xmlNr
   r   )__name__
__module____qualname____doc__classmethodr   r   r   r   r   r   r	          r	   c                   @  r   )

HeaderPartzDefinition of a section header.r
   r   c                 C  r   )z!Return newly created header part.z/word/header%d.xml)r   r   
WML_HEADERr   _default_header_xmlr   r   r   r   r   '   r   zHeaderPart.newc                 C  r   )z6Return bytes containing XML for a default header part.r   r   r   zdefault-header.xmlr   Nr   r%   r   r   r   r2   /   r(   zHeaderPart._default_header_xmlNr)   )r*   r+   r,   r-   r.   r   r2   r   r   r   r   r0   $   r/   r0   )r-   
__future__r   r   typingr   docx.opc.constantsr   r   docx.oxml.parserr   docx.parts.storyr   docx.packager   r	   r0   r   r   r   r   <module>   s    