# Python imports

# Django imports
from django import forms

# LeakLess Monitor imports
DEVICE_ICON = (
    ('', 'Default'),
    ('LL.png', 'LeakLess'),
    ('EH.png', 'Endress Hauser'),
    ('CMC.png', 'CMC'),
    ('SM.png', 'Siemens'),
)

LOCATION_TYPE_CHOICE = (
    ('Hidrant AG', 'Hidrant nadzemni'),
    ('Hidrant UG', 'Hidrant podzemni'),
    ('Kucni prikljucak', 'Kucni prikljucak'),
    ('Mjerno okno', 'Mjerno okno'),
    ('Vodosprema', 'Vodosprema'),
)

OPERATOR_CHOICE = (
    ('VIP', 'VIP'),
    ('T-COM', 'T-COM'),
    ('TELE2', 'TELE2'),
)

SIM_TYPE_CHOICE = (
    ('Data', 'Data'),
    ('Voice', 'Voice'),
)

class DeviceInformationForm_PDLAG(forms.Form):
    device_identifier= forms.CharField(max_length=20,required=False)
    device_identifier.group='General'
    device_note = forms.CharField(max_length=145,required=False,widget=forms.Textarea)
    device_note.group='General'
    device_icon = forms.ChoiceField(choices=DEVICE_ICON,required=False)
    device_icon.group='General'

    sim_card_id = forms.CharField(max_length=20,required=False)
    sim_card_id.group='SIM card'
    sim_card_number = forms.CharField(max_length=20,required=False)
    sim_card_number.group='SIM card'
    sim_card_info = forms.CharField(max_length=145,required=False)
    sim_card_info.group='SIM card'
    sim_card_operator = forms.ChoiceField(choices=OPERATOR_CHOICE,required=False)
    sim_card_operator.group='SIM card'
    sim_card_type = forms.ChoiceField(choices=SIM_TYPE_CHOICE,required=False)
    sim_card_type.group='SIM card'

    location_information = forms.CharField(max_length=145,required=False,widget=forms.Textarea)
    location_information.group='Location'
    location_type = forms.ChoiceField(choices=LOCATION_TYPE_CHOICE,required=False)
    location_type.group='Location'
    location_height = forms.IntegerField(max_value=10000,required=False)
    location_height.group='Location'

    ch1_pressure_name = forms.CharField(max_length=40,required=False)
    ch1_pressure_name.group='Channels'
    ch2_pressure_name = forms.CharField(max_length=40,required=False)
    ch2_pressure_name.group='Channels'
    ch1_flow_name = forms.CharField(max_length=40,required=False)
    ch1_flow_name.group='Channels'
    ch2_flow_name = forms.CharField(max_length=40,required=False)
    ch2_flow_name.group='Channels'
    ch1_digital_name = forms.CharField(max_length=40,required=False)
    ch1_digital_name.group='Channels'
    ch2_digital_name = forms.CharField(max_length=40,required=False)
    ch2_digital_name.group='Channels'


class DeviceInformationForm_MAG8000(forms.Form):
    device_identifier= forms.CharField(max_length=20,required=False)
    device_identifier.group='General'
    device_note = forms.CharField(max_length=145,required=False,widget=forms.Textarea)
    device_note.group='General'
    device_icon = forms.ChoiceField(choices=DEVICE_ICON,required=False)
    device_icon.group='General'

    sim_card_id = forms.CharField(max_length=20,required=False)
    sim_card_id.group='SIM card'
    sim_card_number = forms.CharField(max_length=20,required=False)
    sim_card_number.group='SIM card'
    sim_card_info = forms.CharField(max_length=145,required=False)
    sim_card_info.group='SIM card'
    sim_card_operator = forms.ChoiceField(choices=OPERATOR_CHOICE,required=False)
    sim_card_operator.group='SIM card'
    sim_card_type = forms.ChoiceField(choices=SIM_TYPE_CHOICE,required=False)
    sim_card_type.group='SIM card'

    location_information = forms.CharField(max_length=145,required=False,widget=forms.Textarea)
    location_information.group='Location'
    location_type = forms.ChoiceField(choices=LOCATION_TYPE_CHOICE,required=False)
    location_type.group='Location'
    location_height = forms.IntegerField(max_value=10000,required=False)
    location_height.group='Location'

    ch1_pressure_name = forms.CharField(max_length=40,required=False)
    ch1_pressure_name.group='Channels'
    ch2_pressure_name = forms.CharField(max_length=40,required=False)
    ch2_pressure_name.group='Channels'
    ch1_flow_name = forms.CharField(max_length=40,required=False)
    ch1_flow_name.group='Channels'
    ch2_flow_name = forms.CharField(max_length=40,required=False)
    ch2_flow_name.group='Channels'
    ch1_digital_name = forms.CharField(max_length=40,required=False)
    ch1_digital_name.group='Channels'
    ch2_digital_name = forms.CharField(max_length=40,required=False)
    ch2_digital_name.group='Channels'

    loc_recalculateequation1 = forms.CharField(max_length=40,required=False)
    loc_recalculateequation1.group='Other'
    loc_recalculateequation2 = forms.CharField(max_length=40,required=False)
    loc_recalculateequation2.group='Other'
    loc_analogcurrentunit = forms.CharField(max_length=15,required=False)
    loc_analogcurrentunit.group='Other'
    loc_analogvoltageunit = forms.CharField(max_length=15,required=False)
    loc_analogvoltageunit.group='Other'