import flet as ft

class CbJenisPelaporan:
    def __init__(self):
        self.c1 = ft.Checkbox(label="Fraud/Kecurangan/Korupsi", value=False)
        self.c2 = ft.Checkbox(label="Pelanggaran Kode Etik/Peraturan Perusahaan", value=False)
        self.c3 = ft.Checkbox(label="Pelanggaran Hukum", value=False)
        self.c4 = ft.Checkbox(label="Gratifikasi", value=False)
        self.c5 = ft.Checkbox(label="Suap", value=False)
        self.c6 = ft.Checkbox(label="Kekerasan", value=False)
        self.c7 = ft.Checkbox(label="Lainnya", value=False)
        self.t = ft.Text("Jenis Pelaporan :")

    

    def get_selected_values(self):
        selected_values = []
        if self.c1.value:
            selected_values.append(self.c1.label)
        if self.c2.value:
            selected_values.append(self.c2.label)
        if self.c3.value:
            selected_values.append(self.c3.label)
        if self.c4.value:
            selected_values.append(self.c4.label)
        if self.c5.value:
            selected_values.append(self.c5.label)
        if self.c6.value:
            selected_values.append(self.c6.label)
        if self.c7.value:
            selected_values.append(self.c7.label)
        return selected_values
    
    def reset(self):
        self.c1.value = False
        self.c2.value = False
        self.c3.value = False
        self.c4.value = False
        self.c5.value = False
        self.c6.value = False
        self.c7.value = False
        
