package public_services

import (
	"cpone/db"
	"cpone/models"

	"go.uber.org/zap"
)

func NewServicesSurveyMcu(uStore db.AppStore) *SurveyMcuService {

	return &SurveyMcuService{
		SurveyMcuStore: uStore,
	}
}

type SurveyMcuService struct {
	SurveyMcuStore db.AppStore
}

func (su *SurveyMcuService) GetSurveyMcuByNoreg(nomorRegistrasi string) ([]models.SurveyMcu, error) {

	logger, _ := zap.NewProduction()
	defer logger.Sync()
	logger.Info("QUERY SEARCH GET SURVEY MCU BY NOMOR REGISTRASI",
		zap.String("query search", ""),
	)

	// radio button
	dataItemSurveyMcu := []models.ItemSurveyMcu{
		{
			IDItemSurvey:    "1",
			Nomor:           "1",
			Pertanyaan:      "Bagaimana Penilaian Sikap & Keramahan Petugas?",
			ErrorMessage:    "",
			NameRadioButton: "radio-1",
		},
		{
			IDItemSurvey:    "2",
			Nomor:           "2",
			Pertanyaan:      "Bagaimana Penilaian Penampilan Petugas?",
			ErrorMessage:    "",
			NameRadioButton: "radio-2",
		},
		{
			IDItemSurvey:    "3",
			Nomor:           "3",
			Pertanyaan:      "Bagaimana Penilaian Ketrampilan Petugas?",
			ErrorMessage:    "",
			NameRadioButton: "radio-3",
		},
		{
			IDItemSurvey:    "4",
			Nomor:           "4",
			Pertanyaan:      "Bagaimana Penilaian Pemberian Informasi Petugas?",
			ErrorMessage:    "",
			NameRadioButton: "radio-4",
		},
		{
			IDItemSurvey:    "5",
			Nomor:           "5",
			Pertanyaan:      "Bagaimana Penilaian Kelengkapan Alat?",
			ErrorMessage:    "",
			NameRadioButton: "radio-5",
		},
		{
			IDItemSurvey:    "6",
			Nomor:           "6",
			Pertanyaan:      "Bagaimana Penilaian Kelayakan Alat?",
			ErrorMessage:    "",
			NameRadioButton: "radio-6",
		},
		{
			IDItemSurvey:    "7",
			Nomor:           "7",
			Pertanyaan:      "Bagaimana Penilaian Kebersihan Ruangan?",
			ErrorMessage:    "",
			NameRadioButton: "radio-7",
		},
		{
			IDItemSurvey:    "8",
			Nomor:           "8",
			Pertanyaan:      "Bagaimana Penilaian Kebersihan Ruangan?",
			ErrorMessage:    "",
			NameRadioButton: "radio-8",
		},
		{
			IDItemSurvey:    "9",
			Nomor:           "9",
			Pertanyaan:      "Bagaimana Penilaian Alur Pelayanan?",
			ErrorMessage:    "",
			NameRadioButton: "radio-9",
		},
		{
			IDItemSurvey:    "10",
			Nomor:           "10",
			Pertanyaan:      "Bagaimana Penilaian Ketepatan Waktu?",
			ErrorMessage:    "",
			NameRadioButton: "radio-10",
		},
	}

	// saran
	dataItemSurveyMcuSaran := []models.ItemSurveyMcuSaran{
		{
			IDItemSurveyMcuSaran:       "11",
			NameSurveyMcuSaran:         "saranmcu-11",
			ErrorMessageSurveyMcuSaran: "",
		},
	}

	surveymcu := []models.SurveyMcu{
		{
			DataListItemSurveyMcu:      dataItemSurveyMcu,
			DataListItemSurveyMcuSaran: dataItemSurveyMcuSaran,
		},
	}

	return surveymcu, nil
}
