a
    ij                     @   s^   d Z ddlZddlmZ ddlmZ ejdddZe dde	eej
 e	d	d
dZdS )zResource utils.    N)Optional)epath)returnc                   C   s   t dd d d S )z-Path to the static resources (`.js`, `.css`).etilsZecolabZinspectsZstatic)r   resource_path r   r   b/home/ghrups/robot-bench/.venv/lib/python3.9/site-packages/etils/ecolab/inspects/resource_utils.py_static_path   s    r	   )module)filenamer
   r   c                C   s^   |rt |nt }|| }| }|jdkr<d| dS |jdkrRd| dS tddS )	zReturns the `HTML` associated with the resource.

  Args:
    filename: Path to the `.css`, `.js` resource
    module: Python module name from which the filename is relative too.
  z.cssz<style>z</style>z.jsz<script>z	</script> N)r   r   r	   joinpath	read_textsuffix
ValueError)r   r
   pathcontentr   r   r   resource_import   s    


r   )__doc__	functoolstypingr   r   r   Pathr	   	lru_cachestrPathLiker   r   r   r   r   <module>   s   