# Python imports

# Django imports
from django import forms

# LeakLess Monitor imports
COLORS_CRO = (
    ('red'      , 'Crvena'),
    ('blue'     , 'Plava'),
    ('green'    , 'Zelena'),
    ('yellow'   , 'Zuta'),
    ('purple'   , 'Ljubicasta'),
    ('magenta'  , 'Magenta')
)
# LeakLess Monitor imports
ICONS_CRO = (
    ('/static/map_markers/CMC.png'      , 'Ikona 1'),
    ('/static/map_markers/EH.png'       , 'Ikona 2'),
    ('/static/map_markers/LL.png'       , 'Ikona 3'),
    ('/static/map_markers/MA1.png'      , 'Ikona 4'),
    ('/static/map_markers/MA2.png'      , 'Ikona 5')
)

class LLMapLayerForm(forms.Form):

    layer_name = forms.CharField(max_length=45, required=True, initial='New layer', widget=forms.TextInput(attrs={'placeholder': 'Enter layer name'}))
    path = forms.FileField(label='Select a file:', required=False )


class LLMapLayerPropertiesForm_Cro(forms.Form):
    icon = forms.ChoiceField(choices=ICONS_CRO)  # Field name made lowercase.
    icon.label = 'Izgled markera'
    fill_color = forms.ChoiceField(choices=COLORS_CRO)  # Field name made lowercase.
    fill_color.label = 'Boja ispune'
    fill_opacity = forms.FloatField(initial=0.5,max_value=1, min_value=0)  # Field name made lowercase.
    fill_opacity.label = 'Prozirnost ispune'
    stroke_color = forms.ChoiceField(choices=COLORS_CRO)  # Field name made lowercase.
    stroke_color.label = 'Boja crte'
    stroke_opacity = forms.FloatField(initial=0.5,max_value=1, min_value=0)  # Field name made lowercase.
    stroke_opacity.label = 'Prozirnost crte'
    stroke_weight = forms.IntegerField(initial=5)  # Field name made lowercase.
    stroke_weight.label = 'Debljina crte'
    z_index = forms.IntegerField(initial=5)  # Field name made lowercase.
    z_index.label = 'Dubina'

class LLMapLayerPropertiesForm_Eng(forms.Form):
    icon = forms.ChoiceField(choices=ICONS_CRO)  # Field name made lowercase.
    icon.label = 'Marker'
    fill_color = forms.ChoiceField(choices=COLORS_CRO)  # Field name made lowercase.
    fill_color.label = 'Fill color'
    fill_opacity = forms.FloatField(initial=0.5,max_value=1, min_value=0)  # Field name made lowercase.
    fill_opacity.label = 'Fill opacity'
    stroke_color = forms.ChoiceField(choices=COLORS_CRO)  # Field name made lowercase.
    stroke_color.label = 'Stroke color'
    stroke_opacity = forms.FloatField(initial=0.5,max_value=1, min_value=0)  # Field name made lowercase.
    stroke_opacity.label = 'Stroke opacity'
    stroke_weight = forms.IntegerField(initial=5)  # Field name made lowercase.
    stroke_weight.label = 'Stroke weight'
    z_index = forms.IntegerField(initial=5)  # Field name made lowercase.
    z_index.label = 'Depth'