o
    noi                  
   @   sJ   d dl Z ddee dee dedee fddZd	edee fd
dZdS )    N primary_listsecondary_list	separatorreturnc                    s*   | r|s| p|S  fddt | |D S )aM  
    Combine two lists into a single list with a separator.
    
    Args:
        primary_list (list[str]): The first list.
        secondary_list (list[str]): The second list.
        separator (str, optional): The separator used to join elements. Defaults to a space (" ").

    Returns:
        list[str]: The combined list.
    c                    s    g | ]\}}|   | qS  r   ).0item1item2r   r   N/home/ubuntu/.local/lib/python3.10/site-packages/indic_numtowords/san/utils.py
<listcomp>   s     zcombine.<locals>.<listcomp>)	itertoolsproduct)r   r   r   r   r   r   combine   s   r   numberc                    sv   t  dd g fddtdt ddD  } dkr4| fddtt dd	 D 7 }ttd|S )
z
    Split a number string into parts according to the Indian numbering system.

    Args:
        number (str): The number to split.

    Returns:
        list[str]: The list of constituent parts.
    Nc                    s*   g | ]}t  | d  d |  qS )   r   )maxr   ilengthr   r   r   r      s    z split_number.<locals>.<listcomp>   	   r   c                    s<   g | ]}d  d  d d d ||d  d d d qS )Nr      r   r   r   r   r   r   #   s   < i)lenrangeminlistfilter)r   partsr   r   r   split_number   s   
(r#   )r   )r   r    strr   r#   r   r   r   r   <module>   s    (