o
    W_diM
                     @  sv   d dl mZ d dlmZ ddlmZ ddlmZmZ ddl	m
Z
 ddlmZmZ ddlmZ dd	lmZ dddZdS )    )annotations)sync_playwright   )launch_browser_context)create_run_dirshot)ensure_logged_in)timesheet_navtimesheet_select_date)
DeleteRule)timesheet_deletereturnintc           
      C  s  | j  std| j  dt| d}tt| dd}tt| dd}t| dd}td	d
gdgd||d}t }t|| t	| j d\}}|
 }	zcz3t|	| |ddd t|	| | tj|	| ||d tj|	| ||d t|	|d |jt	| j d W n ty   t|	|d  w W z|  W n	 ty   Y nw z|  W n) ty   Y n!w z|  W n	 ty   Y nw z|  W w  ty   Y w w W d    n1 sw   Y  td td|  td| d|  td|  dS )NzstorageState not found: z. Run bootstrap first.ztimesheet-delete
delete_allFinclude_protectedtimesheet_datez
2026-01-08zAdmin Dutiesz!Admin Duties - TelecommunicationszLunch Break - Unpaidexact)overheads_to_deleteprotected_overheads
match_moder   r   )storage_state )mfa_code	allow_mfa)target_date)ruleok)pathz99-errorz[UI] timesheet-delete OKz[UI] Date: z[UI] delete_all=z include_protected=z[UI] Artifacts: r   )
state_fileexists
SystemExitr   boolgetattrr   r   r   strnew_pager   r	   runr
   r   r   r   	Exceptioncloseprint)
cfgrun_dirr   r   r   r   pbrowsercontextpage r/   _/var/www/html/flask_server/apps/aroflo_connector_app/ui_automation/commands/timesheet_delete.pycmd_timesheet_delete   s~   

%r1   N)r   r   )
__future__r   playwright.sync_apir   core.browserr   core.artifactsr   r   auth.sessionr   flowsr	   r
   flows.timesheet_deleter   r   r1   r/   r/   r/   r0   <module>   s   