File: //snap/certbot/5057/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/align.cpython-312.pyc
�
�F�hT( � � � d dl mZ d dlmZmZmZmZ ddlmZ ddl m
Z
ddlmZ ddl
mZ ddlmZ erdd lmZmZmZmZ ed
Zed Z G d� d
e
� Z G d� de
� Zedk( r�d dlmZmZ d dlmZ d dlm Z e� Z! e� Z e eejE e!d� � ejG e!d� � ejI e!d� � � ddd
�� Z%ejM ejG e%ddejN �� � yy)� )�chain)�
TYPE_CHECKING�Iterable�Optional�Literal� )� Constrain)�JupyterMixin)�Measurement)�Segment)� StyleType)�Console�ConsoleOptions�RenderableType�RenderResult��left�center�right��top�middle�bottomc � � e Zd ZdZ dddddd�dddedee d ee d
edee dee d
dfd�Z
d
efd�Ze
dddddd�dddee d ee d
edee dee d
d fd�� Ze
dddddd�dddee d ee d
edee dee d
d fd�� Ze
dddddd�dddee d ee d
edee dee d
d fd�� Z dd�Zddddd
efd�Zy)�Aligna Align a renderable by adding spaces if necessary.
Args:
renderable (RenderableType): A console renderable.
align (AlignMethod): One of "left", "center", or "right""
style (StyleType, optional): An optional style to apply to the background.
vertical (Optional[VerticalAlignMethod], optional): Optional vertical align, one of "top", "middle", or "bottom". Defaults to None.
pad (bool, optional): Pad the right with spaces. Defaults to True.
width (int, optional): Restrict contents to given width, or None to use default width. Defaults to None.
height (int, optional): Set height of align renderable, or None to fit to contents. Defaults to None.
Raises:
ValueError: if ``align`` is not one of the expected values.
NT)�vertical�pad�width�height�
renderabler �align�styler r r r �returnc � � |dvrt d|�d�� �|�|dvrt d|�d�� �|| _ || _ || _ || _ || _ || _ || _ y )Nr zDinvalid value for align, expected "left", "center", or "right" (not �)r zGinvalid value for vertical, expected "top", "middle", or "bottom" (not )�
ValueErrorr r! r"