
    Cj                     n    S SK Jr  S SKJr  S SKJr  \(       a  S SKJrJrJ	r	J
r
  S SKJr   " S S5      rg)	    )TYPE_CHECKING)Measurement)Segment)ConsoleConsoleOptionsRenderableTypeRenderResult)	StyleTypec                   ^    \ rS rSrSr        SS jr      SS
 jrSSSS	S\4S jrSr	g)Styled   a^  A renderable which allows you to apply a style before and after another renderable.
This can be used to layer styles on top of each other, like a style sandwich. This is used,
for example, in the DataTable to layer default CSS styles + user renderables (e.g. Text objects
stored in the cells of the table) + CSS component styles on top of each other.returnNc                 (    Xl         X l        X0l        g)al  Construct a Styled.

Args:
    renderable (RenderableType): Any renderable.
    pre_style (StyleType): A style to apply across the entire renderable.
        Will be applied before the styles from the renderable itself.
    post_style (StyleType): A style to apply across the entire renderable.
        Will be applied after the styles from the renderable itself.
N)
renderable	pre_style
post_style)selfr   r   r   s       l/home/rurouni/.local/share/pipx/venvs/strix-agent/lib/python3.13/site-packages/textual/renderables/styled.py__init__Styled.__init__   s     %"$    consoler   optionsr   c                     UR                  U R                  5      nUR                  U R                  5      nUR                  U R                  U5      n[
        R                  " XSUS9nU$ )N)styler   )	get_styler   r   renderr   r   apply_style)r   r   r   r   r   rendered_segmentssegmentss          r   __rich_console__Styled.__rich_console__$   s]     %%dnn5	&&t7
#NN4??GD&&:
 r   c                 D    [         R                  " XU R                  5      $ )N)r   getr   )r   r   r   s      r   __rich_measure__Styled.__rich_measure__/   s     wAAr   )r   r   r   )r   r   r   r
   r   r
   r   N)r   r   r   r   r   r	   )
__name__
__module____qualname____firstlineno____doc__r   r!   r   r%   __static_attributes__ r   r   r   r      sq    V
%$% %  	%
 
%&	 	+;			B B+;B	Br   r   N)typingr   rich.measurer   rich.segmentr   rich.consoler   r   r   r	   
rich.styler
   r   r-   r   r   <module>r3      s&      $  RR$'B 'Br   