
    ,h                        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
e      Z G d de      Zy)zHeader and footer part objects.    )annotationsN)TYPE_CHECKING)CONTENT_TYPE)	parse_xml)	StoryPart)Packagec                  2    e Zd ZdZedd       Zed        Zy)
FooterPartzDefinition of a section footer.c                    |j                  d      }t        j                  }t        | j	                               } | ||||      S )z!Return newly created footer part.z/word/footer%d.xml)next_partnameCT
WML_FOOTERr   _default_footer_xmlclspackagepartnamecontent_typeelements        S/var/www/html/Resume-Scraper/venv/lib/python3.12/site-packages/docx/parts/hdrftr.pynewzFooterPart.new   B     (()=>}}C33568\7G<<    c                    t         j                  j                  t         j                  j                  t              d   ddd      }t        |d      5 }|j                         }ddd       |S # 1 sw Y   S xY w)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_bytess       r   r   zFooterPart._default_footer_xml   b     ww||BGGMM(3A6kK_`$ 	!I	!	!   A..A8Nr   r   )__name__
__module____qualname____doc__classmethodr   r    r   r   r
   r
      +    )= =  r   r
   c                  2    e Zd ZdZedd       Zed        Zy)
HeaderPartzDefinition of a section header.c                    |j                  d      }t        j                  }t        | j	                               } | ||||      S )z!Return newly created header part.z/word/header%d.xml)r   r   
WML_HEADERr   _default_header_xmlr   s        r   r   zHeaderPart.new'   r   r   c                    t         j                  j                  t         j                  j                  t              d   ddd      }t        |d      5 }|j                         }ddd       |S # 1 sw Y   S xY w)z6Return bytes containing XML for a default header part.r   r   r   zdefault-header.xmlr   Nr   r&   s       r   r7   zHeaderPart._default_header_xml/   r)   r*   Nr+   )r,   r-   r.   r/   r0   r   r7   r1   r   r   r4   r4   $   r2   r   r4   )r/   
__future__r   r   typingr   docx.opc.constantsr   r   docx.oxml.parserr   docx.parts.storyr   docx.packager   r
   r4   r1   r   r   <module>r?      s8    % " 	   1 & &$ ( r   