+
    "i+                        R t ^ RIHt ^ RIHt ^ RIHt ^RIHtH	t	 ^RI
Ht ^RIHt ^RIHt ]'       d   ^RIHt  ! R	 R
]4      tR# )zClass for themes in HACS.)annotations)TYPE_CHECKING)HomeAssistantError)HacsCategoryHacsDispatchEvent)HacsException)
concurrent)HacsRepository)HacsBasec                     a  ] tR t^tRtR V 3R llt]R 4       tR tR t	R t
R R	 ltR
 R lt]! ^
^R7      RR l4       tRtV ;t# )HacsTemplateRepositoryzCustom templates in HACS.c                    V ^8  d   QhRRRR/# )   hacsr
   	full_namestr )formats   "7/config/custom_components/hacs/repositories/template.py__annotate__#HacsTemplateRepository.__annotate__   s     # #X ## #    c                f  < \         SV `  VR7       W P                  n        VP	                  4       V P                  n        \        P                  V P                  n        RV P                  P                  n        V P                  V P                  P                  n        RV P                  n        R# )zInitialize.)r    TN)super__init__datar   lowerfull_name_lowerr   TEMPLATEcategorycontentpathremote	localpathlocalsingle)selfr   r   	__class__s   &&&r   r   HacsTemplateRepository.__init__   sv    d#'		$-OO$5		!)22		#% "&.."r   c                H    V P                   P                  P                   R2# )zReturn localpath.z/custom_templates)r   coreconfig_pathr'   s   &r   r$    HacsTemplateRepository.localpath   s!     ))..,,-->??r   c                B   "   V P                  4       G Rj  xL
  R#  L5i)zRun post installation steps.N_reload_custom_templatesr-   s   &r   async_post_installation.HacsTemplateRepository.async_post_installation$        ++---   c                >  "   V P                  4       G Rj  xL
  V P                  P                  V P                  n        V P                  P                  '       dl   RV P                  P                  9   gQ   V P                  P                  P                  R4      '       d&   V P                  P                  V P                  9  d6   \        V P                   RV P                  P                  RR4       R24      hV P                  P                  '       dm   V P                  P                   FR  pV P                  P                  P                  '       d   K+  V P                   P#                  RV P                  V4       KT  	  V P                  P$                  #  EL5i)	z	Validate.N/z.jinjaz Repository structure for ztags/r   z is not compliant%s %s)common_validaterepository_manifestfilenamer   	file_nameendswith	treefilesr   stringrefreplacevalidateerrorsr   statusstartuploggererrorsuccess)r'   rG   s   & r   validate_repository*HacsTemplateRepository.validate_repository(   s+     ""$$$ #66??		 		###dii)))99&&//99yy""$..8;;-9$((:J:J7SU:V9WWhi 
 ==--yy''///KK%%gt{{EB . }}$$$) 	%s+   FFAFAF"A5F<FAFc                P  "   V P                   P                  V P                  n        V P                  V P
                  P                  n        V P                  P                  P                  '       d0   V P                  P                  P                  V 4      G Rj  xL
  R# R#  L5i)zRegistration.N)r:   r;   r   r<   r$   r!   r"   r%   r   systemaction
validationasync_run_repository_checksr-   s   &r   async_post_registration.HacsTemplateRepository.async_post_registrationA   sq      #66??		"&..99"""))&&BB4HHH #Hs   BB&B$	B&c                   V ^8  d   QhRR/# r   returnNoner   )r   s   "r   r   r   J   s     . .D .r   c                B   "   V P                  4       G Rj  xL
  R#  L5i)zRun post uninstall steps.Nr0   r-   s   &r   async_post_uninstall+HacsTemplateRepository.async_post_uninstallJ   r4   r5   c                   V ^8  d   QhRR/# rS   r   )r   s   "r   r   r   N   s     C C Cr   c                R  "   V P                   P                  RV P                  4        V P                  P                  P
                  P                  RR/ 4      G Rj  xL
  R#  L  \         d3   pT P                   P                  RT P                  T4        Rp?R# Rp?ii ; i5i)zReload custom templates.z%s Reloading custom templateshomeassistantreload_custom_templatesNr8   )	rF   debugr?   r   hassservices
async_callr   	exception)r'   ra   s   & r   r1   /HacsTemplateRepository._reload_custom_templatesN   sz     94;;G	C))..))44_F_acddd! 	CKK!!'4;;	BB	Cs@   'B'4A' A%A' #B'%A' 'B$2'BB'B$$B')concurrenttasksbackoff_timec                  "   V P                  W4      G Rj  xL
 '       g   V'       g   R# V P                  P                  V P                  n        V P
                  V P                  P                  n        V P                  P                  '       d]   V P                  P                  \        P                  RRRRRV P                  P                  RV P                  P                  /4       R# R#  L5i)zUpdate.Nidi9  rM   update
repositoryrepository_id)common_updater:   r;   r   r<   r$   r!   r"   r%   	installedr   async_dispatchr   
REPOSITORYr   rf   )r'   ignore_issuesforces   &&&r   update_repository(HacsTemplateRepository.update_repositoryV   s      ''===e #66??		"&.. 99II$$!,,$h $))"5"5#TYY\\	  >s!   C2C0	C2C2A'C2AC2r   )FF)__name__
__module____qualname____firstlineno____doc__r   propertyr$   r2   rI   rP   rW   r1   r   rp   __static_attributes____classcell__)r(   s   @r   r   r      s\    ## # @ @.%2I.C 3 4r   r   N)rv   
__future__r   typingr   homeassistant.exceptionsr   enumsr   r   
exceptionsr   utils.decoratorr   baser	   r
   r   r   r   r   <module>r      s1     "   7 3 & (  X^ Xr   