o
    +×¾gÐ  ã                   @   sp   d Z ddlmZmZ ddlmZmZ eeef Z				dde	d	ed
ee de
de	f
dd„Zdedefdd„ZdS )z4Provides a wrpper for the Rust based implementation.é    )ÚOptionalÚUnioné   )Úget_base_level_innerÚget_display_innerúutf-8NFÚstr_or_bytesÚencodingÚbase_dirÚdebugÚreturnc                 C   s@   t | tƒr|  |¡}d}n| }d}t|||ƒ}|r| |¡}|S )aa  Accepts string or bytes. In case of bytes, `encoding`
    is needed as the inner function expects a valid string (default:"utf-8").

    Set `base_dir` to 'L' or 'R' to override the calculated base_level.

    Set `debug` to True to return the calculated levels.

    Returns the display layout, either as unicode or `encoding` encoded
    string.

    TF)Ú
isinstanceÚbytesÚdecoder   Úencode)r   r	   r
   r   ÚtextÚwas_decodedÚdisplay© r   úV/var/www/html/backend_erp/backend_erp_env/lib/python3.10/site-packages/bidi/wrapper.pyÚget_display	   s   


r   r   c                 C   s   t | ƒS )zxReturns the base unicode level of the 1st paragraph in `text`.

    Return value of 0 means LTR, while 1 means RTL.
    )r   )r   r   r   r   Úget_base_level)   s   r   )r   NF)Ú__doc__Útypingr   r   Úbidir   r   Ústrr   Ú
StrOrBytesÚboolr   Úintr   r   r   r   r   Ú<module>   s&    üÿþýü
û 