o
    \ßkð  ã                   @   s„   d dl mZ d dlZd dlmZmZ d dlmZ d dlmZ d dl	m
Z
 d dlmZ d dl mZ d dlmZmZ d	d
„ Zdd„ ZdS )é    )Ú	timedeltaN)Ú	messagingÚcredentials)Úgeodesic)Ú	send_mail)Úsettings)Útimezone)Úsend_firebase_notificationÚsave_notification_historyc                 C   ó`   d}d|j › d|j› d�}| j ¡ j}dt|jƒd|j› dœ}t| |||dƒ t||||ƒ d S )	NzVehicle updatedzYour assigned vehicle is now z (z).ÚVEHICLE_ASSIGNEDÚprofile©ÚtypeÚ
booking_idÚscreenÚvehicle_regzVehicle Assigned©	Úvehicle_nameÚplate_numberÚdevicesÚfirstÚdevice_tokenÚstrÚidr
   r	   ©ÚdriverÚvehicleÚtitleÚbodyr   Údata© r!   ú./var/www/html/loop/vehiclehub/notifications.pyÚnotify_driver_vehicle_assigned   ó   r#   c                 C   r   )	NzVehicle releasedzYour assigned vehicle Ú z released now.ÚVEHICLE_RELEASEDr   r   zVehicle Releasedr   r   r!   r!   r"   Únotify_driver_vehicle_released   r$   r'   )Údatetimer   Úfirebase_adminr   r   Úgeographiclibr   Údjango.core.mailr   Údjango.confr   Údjango.utilsr   Úbooking.notificationsr	   r
   r#   r'   r!   r!   r!   r"   Ú<module>   s    	
