<script setup lang="ts">
import { onMounted, ref, watch, reactive } from "vue";
import { useRoute } from "vue-router";
import { useQuasar } from "quasar";
import http from "@/plugins/http";
import config from "@/app.config";
import type { QTableProps, QForm } from "quasar";

import { useCounterMixin } from "@/stores/mixin";
import { useResultsPerformDataStore } from "@/modules/04_registryNew/stores/ResultsPerformance";
import DialogHeader from "@/components/DialogHeader.vue";

import type { RequestItemsObject } from "@/modules/04_registryNew/interface/request/ResultsPerformance";
import type { ResponseObject } from "@/modules/04_registryNew/interface/response/ResultsPerformance";

const $q = useQuasar();
const route = useRoute();
const store = useResultsPerformDataStore();
const { textRangePoint, textPoint } = store;
const mixin = useCounterMixin();
const {
  date2Thai,
  success,
  messageError,
  showLoader,
  hideLoader,
  dialogConfirm,
} = mixin;
const profileId = ref<string>(
  route.params.id ? route.params.id.toString() : ""
);

const id = ref<string>("");
const resPerformForm = reactive<RequestItemsObject>({
  name: "",
  point1Total: 0,
  point1: 0,
  point2Total: 0,
  point2: 0,
  pointSumTotal: 0,
  pointSum: 0,
  date: null,
});

const currentPage = ref<number>(1);
const maxPage = ref<number>(1);
const currentPageHistory = ref<number>(1);
const maxPageHistory = ref<number>(1);
const isEdit = ref<boolean>(false);
const modal = ref<boolean>(false);
const modeView = ref<string>("table");
const filterSearch = ref("");
const filterHistory = ref<string>("");
const modalHistory = ref<boolean>(false);
const rowsHistory = ref<ResponseObject[]>([]);

const rows = ref<ResponseObject[]>([]);

const columns = ref<QTableProps["columns"]>([
  {
    name: "date",
    align: "left",
    label: "วันที่ได้รับ",
    sortable: true,
    field: "date",
    headerStyle: "font-size: 14px",
    style: "font-size: 14px",
    format: (v) => date2Thai(v),
  },
  {
    name: "point1Total",
    align: "left",
    label: "ส่วนที่1 (คะแนน)",
    sortable: true,
    field: "point1Total",
    headerStyle: "font-size: 14px",
    style: "font-size: 14px",
    sort: (a: string, b: string) =>
      a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
  },
  {
    name: "point1",
    align: "left",
    label: "ผลประเมินส่วนที่1 (คะแนน)",
    sortable: true,
    field: "point1",
    headerStyle: "font-size: 14px",
    style: "font-size: 14px",
    sort: (a: string, b: string) =>
      a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
  },
  {
    name: "point2Total",
    align: "left",
    label: "ส่วนที่2 (คะแนน)",
    sortable: true,
    field: "point2Total",
    headerStyle: "font-size: 14px",
    style: "font-size: 14px",
    sort: (a: string, b: string) =>
      a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
  },
  {
    name: "point2",
    align: "left",
    label: "ผลประเมินส่วนที่2 (คะแนน)",
    sortable: true,
    field: "point2",
    headerStyle: "font-size: 14px",
    style: "font-size: 14px",
    sort: (a: string, b: string) =>
      a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
  },
  {
    name: "pointSumTotal",
    align: "left",
    label: "ผลรวม (คะแนน)",
    sortable: true,
    field: "pointSumTotal",
    headerStyle: "font-size: 14px",
    style: "font-size: 14px",
    sort: (a: string, b: string) =>
      a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
  },
  {
    name: "pointSum",
    align: "left",
    label: "ผลประเมินรวม (คะแนน)",
    sortable: true,
    field: "pointSum",
    headerStyle: "font-size: 14px",
    style: "font-size: 14px",
    sort: (a: string, b: string) =>
      a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
  },
  {
    name: "name",
    align: "left",
    label: "ผลประเมิน",
    sortable: true,
    field: (v) => `${textPoint(v.pointSum)} ${textRangePoint(v.pointSum)}`,
    headerStyle: "font-size: 14px",
    style: "font-size: 14px",
    sort: (a: string, b: string) =>
      a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
  },
]);
const columnsHistory = ref<QTableProps["columns"]>([
  {
    name: "date",
    align: "left",
    label: "วันที่ได้รับ",
    sortable: true,
    field: "date",
    headerStyle: "font-size: 14px",
    style: "font-size: 14px",
    format: (v) => date2Thai(v),
  },
  {
    name: "point1Total",
    align: "left",
    label: "ส่วนที่1 (คะแนน)",
    sortable: true,
    field: "point1Total",
    headerStyle: "font-size: 14px",
    style: "font-size: 14px",
  },
  {
    name: "point1",
    align: "left",
    label: "ผลประเมินส่วนที่1 (คะแนน)",
    sortable: true,
    field: "point1",
    headerStyle: "font-size: 14px",
    style: "font-size: 14px",
    sort: (a: string, b: string) =>
      a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
  },
  {
    name: "point2Total",
    align: "left",
    label: "ส่วนที่2 (คะแนน)",
    sortable: true,
    field: "point2Total",
    headerStyle: "font-size: 14px",
    style: "font-size: 14px",
    sort: (a: string, b: string) =>
      a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
  },
  {
    name: "point2",
    align: "left",
    label: "ผลประเมินส่วนที่2 (คะแนน)",
    sortable: true,
    field: "point2",
    headerStyle: "font-size: 14px",
    style: "font-size: 14px",
    sort: (a: string, b: string) =>
      a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
  },
  {
    name: "pointSumTotal",
    align: "left",
    label: "ผลรวม (คะแนน)",
    sortable: true,
    field: "pointSumTotal",
    headerStyle: "font-size: 14px",
    style: "font-size: 14px",
    sort: (a: string, b: string) =>
      a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
  },
  {
    name: "pointSum",
    align: "left",
    label: "ผลประเมินรวม (คะแนน)",
    sortable: true,
    field: "pointSum",
    headerStyle: "font-size: 14px",
    style: "font-size: 14px",
    sort: (a: string, b: string) =>
      a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
  },
  {
    name: "name",
    align: "left",
    label: "ผลประเมิน",
    sortable: true,
    field: (v) => `${textPoint(v.pointSum)} ${textRangePoint(v.pointSum)}`,
    headerStyle: "font-size: 14px",
    style: "font-size: 14px",
    sort: (a: string, b: string) =>
      a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
  },
  {
    name: "lastUpdateFullName",
    align: "left",
    label: "ผู้ดำเนินการ",
    sortable: true,
    field: "lastUpdateFullName",
    headerStyle: "font-size: 14px",
    style: "font-size: 14px",
    sort: (a: string, b: string) =>
      a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
  },
  {
    name: "lastUpdatedAt",
    align: "left",
    label: "วันที่แก้ไข",
    sortable: true,
    field: "lastUpdatedAt",
    headerStyle: "font-size: 14px",
    style: "font-size: 14px",
    format: (v) => date2Thai(v),
    sort: (a: string, b: string) =>
      a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
  },
]);
const visibleColumnsHistory = ref<String[]>([
  "point1Total",
  "point1",
  "point2Total",
  "point2",
  "pointSumTotal",
  "pointSum",
  "name",
  "date",
  "lastUpdateFullName",
  "lastUpdatedAt",
]);

const visibleColumns = ref<String[]>([
  "point1Total",
  "point1",
  "point2Total",
  "point2",
  "pointSumTotal",
  "pointSum",
  "name",
  "date",
]);

const pagination = ref({
  page: 1,
  rowsPerPage: 10,
});

const historyPagination = ref({
  page: 1,
  rowsPerPage: 10,
});

async function fetchData() {
  if (!profileId.value) return;

  showLoader();
  try {
    const res = await http.get(
      config.API.profileNewAssessmentsByProfileId(profileId.value)
    );
    rows.value = res.data.result;
  } catch (error) {
    messageError($q, error);
  } finally {
    hideLoader();
  }
}

async function addEditData(editStatus: boolean = false) {
  if (!profileId.value) return;

  const url = editStatus
    ? config.API.profileNewAssessmentsById(id.value)
    : config.API.profileNewAssessments;
  const method = editStatus ? "patch" : "post";
  const reqBody: RequestItemsObject = {
    ...resPerformForm,
    profileId: editStatus ? undefined : profileId.value,
  };

  try {
    await http[method](url, reqBody);
    success($q, "บันทึกข้อมูลสำเร็จ");
    await fetchData();
  } catch (e) {
    messageError($q, e);
  } finally {
    hideLoader();
  }
}

function onClickOpenDialog(editStatus: boolean = false, row?: ResponseObject) {
  modal.value = true;
  isEdit.value = editStatus;

  if (editStatus && row) {
    id.value = row.id;
    resPerformForm.name = row.name;
    resPerformForm.point1Total = row.point1Total;
    resPerformForm.point1 = row.point1;
    resPerformForm.point2Total = row.point2Total;
    resPerformForm.point2 = row.point2;
    resPerformForm.pointSumTotal = row.pointSumTotal;
    resPerformForm.pointSum = row.pointSum;
    resPerformForm.date = row.date;
  } else {
    clearData();
  }
}

async function clickClose() {
  clearData();
  modal.value = false;
}

async function clickHistory(row: ResponseObject) {
  modalHistory.value = true;
  filterSearch.value = "";

  showLoader();
  try {
    const res = await http.get(config.API.profileNewAssessmentsHisById(row.id));

    rowsHistory.value = res.data.result;
  } catch (e) {
    messageError($q, e);
  } finally {
    hideLoader();
  }
}

function onSubmit() {
  dialogConfirm(
    $q,
    async () => {
      addEditData(isEdit.value);
      modal.value = false;
    },
    "ยืนยันการบันทึกข้อมูล",
    "ต้องการยืนยันการบันทึกข้อมูลนี้หรือไม่ ?"
  );
}

function clearData() {
  (id.value = ""),
    (resPerformForm.name = ""),
    (resPerformForm.point1Total = 0),
    (resPerformForm.point1 = 0),
    (resPerformForm.point2Total = 0),
    (resPerformForm.point2 = 0),
    (resPerformForm.pointSumTotal = 0),
    (resPerformForm.pointSum = 0),
    (resPerformForm.date = null);
}

onMounted(async () => {
  await fetchData();
});
</script>
<template>
  <div class="row items-center q-gutter-x-sm q-py-sm">
    <q-btn color="teal-5" icon="add" flat round @click="onClickOpenDialog()"
      ><q-tooltip>เพิ่มข้อมูล</q-tooltip></q-btn
    >

    <q-space />
    <q-input
      standout
      dense
      v-model="filterSearch"
      ref="filterRef"
      outlined
      placeholder="ค้นหา"
      debounce="300"
    >
      <template v-slot:append>
        <q-icon
          v-if="filterSearch == ''"
          name="search"
          @click.stop.prevent="filterSearch = ''"
          class="cursor-pointer"
        />
        <q-icon
          v-if="filterSearch"
          name="cancel"
          @click.stop.prevent="filterSearch = ''"
          class="cursor-pointer"
        />
      </template>
    </q-input>
    <q-select
      v-if="modeView == 'table'"
      v-model="visibleColumns"
      multiple
      outlined
      dense
      options-dense
      :display-value="$q.lang.table.columns"
      emit-value
      map-options
      :options="columns"
      option-value="name"
      options-cover
      style="min-width: 150px"
    />
    <q-btn-toggle
      v-model="modeView"
      dense
      class="no-shadow toggle-borderd"
      toggle-color="grey-4"
      :options="[
        { value: 'table', slot: 'table' },
        { value: 'card', slot: 'card' },
      ]"
    >
      <template v-slot:table>
        <q-icon
          name="format_list_bulleted"
          size="24px"
          :style="{
            color: modeView === 'table' ? '#787B7C' : '#C9D3DB',
          }"
        />
      </template>

      <template v-slot:card>
        <q-icon
          name="mdi-view-grid-outline"
          size="24px"
          :style="{
            color: modeView === 'card' ? '#787B7C' : '#C9D3DB',
          }"
        />
      </template>
    </q-btn-toggle>
  </div>

  <d-table
    flat
    dense
    bordered
    :rows="rows"
    :paging="true"
    :columns="columns"
    :filter="filterSearch"
    v-model:pagination="pagination"
    :grid="modeView === 'card'"
    :visible-columns="visibleColumns"
    :rows-per-page-options="[20, 50, 100]"
    :card-container-class="modeView === 'card' ? 'q-col-gutter-md' : ''"
  >
    <template v-slot:header="props">
      <q-tr :props="props">
        <q-th v-for="col in props.cols" :key="col.name" :props="props">
          <span class="text-weight-medium">{{ col.label }}</span>
        </q-th>
        <q-th auto-width />
      </q-tr>
    </template>

    <template v-slot:body="props" v-if="modeView === 'table'">
      <q-tr :props="props">
        <q-td
          v-for="col in props.cols"
          :key="col.name"
          :props="props"
          class="cursor-pointer"
        >
          <div class="table_ellipsis">
            {{ col.value ? col.value : "-" }}
          </div>
        </q-td>
        <q-td auto-width>
          <q-btn
            flat
            dense
            round
            class="q-mr-xs"
            size="14px"
            color="primary"
            icon="mdi-pencil-outline"
            @click="onClickOpenDialog(true, props.row)"
          >
            <q-tooltip>แก้ไขข้อมูล</q-tooltip>
          </q-btn>
          <q-btn
            color="info"
            flat
            dense
            round
            size="14px"
            icon="mdi-history"
            @click="clickHistory(props.row)"
          >
            <q-tooltip>ประวัติแก้ไขผลการประเมินการปฏิบัติราชการ</q-tooltip>
          </q-btn>
        </q-td>
      </q-tr>
    </template>

    <template v-slot:item="props" v-else>
      <div class="col-xs-12 col-sm-6 col-md-6">
        <q-card bordered>
          <q-card-actions class="bg-grey-3" align="right">
            <q-btn
              flat
              round
              color="primary"
              icon="mdi-pencil-outline"
              @click.stop.prevent="onClickOpenDialog(true, props.row)"
            >
              <q-tooltip>แก่ไขข้อมุล</q-tooltip>
            </q-btn>
            <q-btn
              flat
              round
              color="info"
              icon="mdi-history"
              @click="clickHistory(props.row)"
            >
              <q-tooltip>ประวัติแก้ไขเครื่องราชอิสริยาภรณ์</q-tooltip>
            </q-btn>
          </q-card-actions>
          <q-separator />
          <div>
            <q-item
              v-for="(col, index) in props.cols.filter(
                (col) => col.name !== 'desc'
              )"
              :key="col.name"
              :class="index % 2 !== 0 ? 'bg-grey-1' : ''"
            >
              <q-item-section class="text-grey-6">
                <q-item-label>{{ col.label }}</q-item-label>
              </q-item-section>

              <q-item-section class="text-dark">
                <q-item-label>
                  {{ col.value ? col.value : "-" }}
                </q-item-label>
              </q-item-section>
            </q-item>
          </div>
        </q-card>
      </div>
    </template>
  </d-table>

  <q-dialog v-model="modal" persistent>
    <q-layout
      view="lHh lpr lFf"
      container
      style="height: 350px"
      class="bg-white"
    >
      <q-form greedy @submit.prevent @validation-success="onSubmit">
        <q-header>
          <q-toolbar>
            <DialogHeader
              :tittle="
                isEdit
                  ? 'แก้ไขผลการประเมินการปฏิบัติราชการ'
                  : 'เพิ่มผลการประเมินการปฏิบัติราชการ'
              "
              :close="clickClose"
            />
          </q-toolbar>
          <q-separator color="grey-4" />
        </q-header>

        <q-page-container>
          <q-page class="q-pa-md">
            <div class="row col-12 q-col-gutter-x-xs q-col-gutter-y-xs">
              <div class="col-12">
                <datepicker
                  autoApply
                  borderless
                  week-start="0"
                  menu-class-name="modalfix"
                  v-model="resPerformForm.date"
                  :locale="'th'"
                  :enableTimePicker="false"
                >
                  <template #year="{ year }">
                    {{ year + 543 }}
                  </template>
                  <template #year-overlay-value="{ value }">
                    {{ parseInt(value + 543) }}
                  </template>
                  <template #trigger>
                    <q-input
                      dense
                      outlined
                      for="inputDatereceive"
                      ref="dateReceivedRef"
                      class="inputgreen"
                      hide-bottom-space
                      :model-value="date2Thai(resPerformForm.date as Date)"
                      :label="`${'วันที่ได้รับ'}`"
                      :rules="[(val) => !!val || `${'กรุณาเลือกวันที่ได้รับ'}`]"
                    >
                      <template v-slot:prepend>
                        <q-icon
                          name="event"
                          class="cursor-pointer"
                          color="primary"
                        />
                      </template>
                    </q-input>
                  </template>
                </datepicker>
              </div>
              <div class="col-xs-6 col-sm-6 col-md-6">
                <q-input
                  dense
                  outlined
                  lazy-rules
                  hide-bottom-space
                  mask="###"
                  class="inputgreen"
                  v-model="resPerformForm.point1Total"
                  input-class="text-right "
                  :label="`${'ส่วนที่1 (คะแนน)'}`"
                  :rules="[(val) => !!val || `${'กรุณากรอกส่วนที่1 (คะแนน)'}`]"
                  @update:model-value="
                    resPerformForm.point1Total > 100
                      ? (resPerformForm.point1Total = 100)
                      : ''
                  "
                />
              </div>
              <div class="col-xs-6 col-sm-6 col-md-6">
                <q-input
                  dense
                  outlined
                  lazy-rules
                  hide-bottom-space
                  mask="###"
                  class="inputgreen"
                  v-model="resPerformForm.point1"
                  input-class="text-right"
                  :label="`${'ผลประเมินส่วนที่1 (คะแนน)'}`"
                  :rules="[
                    (val) => !!val || `${'กรุณากรอกผลประเมินส่วนที่1 (คะแนน)'}`,
                  ]"
                  @update:model-value="
                    resPerformForm.point1 > 100
                      ? (resPerformForm.point1 = 100)
                      : ''
                  "
                />
              </div>
              <div class="col-xs-6 col-sm-6 col-md-6">
                <q-input
                  dense
                  outlined
                  lazy-rules
                  hide-bottom-space
                  mask="###"
                  class="inputgreen"
                  v-model="resPerformForm.point2Total"
                  input-class="text-right"
                  :label="`${'ส่วนที่2 (คะแนน)'}`"
                  :rules="[(val) => !!val || `${'กรุณากรอกส่วนที่2 (คะแนน)'}`]"
                  @update:model-value="
                    resPerformForm.point2Total > 100
                      ? (resPerformForm.point2Total = 100)
                      : ''
                  "
                />
              </div>
              <div class="col-xs-6 col-sm-6 col-md-6">
                <q-input
                  dense
                  outlined
                  lazy-rules
                  hide-bottom-space
                  mask="###"
                  class="inputgreen"
                  v-model="resPerformForm.point2"
                  input-class="text-right"
                  :label="`${'ผลประเมินส่วนที่2 (คะแนน)'}`"
                  :rules="[
                    (val) => !!val || `${'กรุณากรอกผลประเมินส่วนที่2 (คะแนน)'}`,
                  ]"
                  @update:model-value="
                    resPerformForm.point2 > 100
                      ? (resPerformForm.point2 = 100)
                      : ''
                  "
                />
              </div>
              <div class="col-xs-6 col-sm-6 col-md-6">
                <q-input
                  dense
                  outlined
                  lazy-rules
                  hide-bottom-space
                  mask="###"
                  class="inputgreen"
                  v-model="resPerformForm.pointSumTotal"
                  input-class="text-right"
                  :label="`${'ผลรวม (คะแนน)'}`"
                  :rules="[(val) => !!val || `${'กรุณากรอกผลรวม (คะแนน)'}`]"
                  @update:model-value="
                    resPerformForm.pointSumTotal > 100
                      ? (resPerformForm.pointSumTotal = 100)
                      : ''
                  "
                />
              </div>
              <div class="col-xs-6 col-sm-6 col-md-6">
                <q-input
                  dense
                  outlined
                  lazy-rules
                  hide-bottom-space
                  mask="###"
                  v-model="resPerformForm.pointSum"
                  class="inputgreen"
                  input-class="text-right"
                  :label="`${'ผลประเมินรวม (คะแนน)'}`"
                  :rules="[
                    (val) => !!val || `${'กรุณากรอกผลประเมินรวม (คะแนน)'}`,
                  ]"
                  @update:model-value="
                    resPerformForm.pointSum > 100
                      ? (resPerformForm.pointSum = 100)
                      : ''
                  "
                />
              </div>
              <div class="text-subtitle2 col-12 row items-center">
                <q-space></q-space>
                ผลการประเมิน:
                <div class="text-bold items-center q-px-sm">
                  {{ textPoint(resPerformForm.pointSum) }}
                </div>
                {{ textRangePoint(resPerformForm.pointSum) }}
              </div>
            </div>
          </q-page>
        </q-page-container>
        <q-separator />
        <q-footer>
          <q-separator color="grey-4" />
          <q-toolbar class="fit row wrap justify-end items-start content-start">
            <q-btn
              dense
              unelevated
              label="บันทึก"
              id="onSubmit"
              type="submit"
              color="public"
              class="q-px-md"
            >
              <q-tooltip>บันทึกข้อมูล</q-tooltip>
            </q-btn>
          </q-toolbar>
        </q-footer>
      </q-form>
    </q-layout>
  </q-dialog>

  <q-dialog v-model="modalHistory" persistent>
    <q-layout
      view="lHh lpr lFf"
      container
      style="height: 500px; min-width: 80%"
      class="bg-white"
    >
      <q-header>
        <q-toolbar>
          <DialogHeader
            tittle="ประวัติแก้ไขผลการประเมินการปฏิบัติราชการ"
            :close="() => (modalHistory = false)"
          />
        </q-toolbar>
        <q-separator color="grey-4" />
      </q-header>

      <q-page-container>
        <q-page class="q-pa-md">
          <div class="row q-gutter-sm q-mb-sm">
            <q-space />
            <q-input
              standout
              dense
              v-model="filterHistory"
              ref="filterRef"
              outlined
              placeholder="ค้นหา"
              debounce="300"
            >
              <template v-slot:append>
                <q-icon
                  v-if="filterHistory == ''"
                  name="search"
                  @click.stop.prevent="filterHistory = ''"
                  class="cursor-pointer"
                />
                <q-icon
                  v-if="filterHistory"
                  name="cancel"
                  @click.stop.prevent="filterHistory = ''"
                  class="cursor-pointer"
                />
              </template>
            </q-input>
            <q-select
              v-model="visibleColumnsHistory"
              multiple
              outlined
              dense
              options-dense
              :display-value="$q.lang.table.columns"
              emit-value
              map-options
              :options="columnsHistory"
              option-value="name"
              options-cover
              style="min-width: 150px"
            />
          </div>
          <d-table
            ref="table"
            flat
            bordered
            dense
            :columns="columnsHistory"
            v-model:pagination="historyPagination"
            :rows="rowsHistory"
            :paging="true"
            :rows-per-page-options="[10, 25, 50, 100]"
            :visible-columns="visibleColumnsHistory"
            :filter="filterHistory"
          >
            >
            <template v-slot:header="props">
              <q-tr :props="props">
                <q-th v-for="col in props.cols" :key="col.name" :props="props">
                  <span class="text-weight-medium">{{ col.label }}</span>
                </q-th>
              </q-tr>
            </template>
            <template v-slot:body="props">
              <q-tr :props="props" class="cursor-pointer">
                <q-td v-for="col in props.cols" :key="col.id">
                  <div>
                    {{ col.value ? col.value : "-" }}
                  </div>
                </q-td>
              </q-tr>
            </template>
          </d-table>
        </q-page>
      </q-page-container>
    </q-layout>
  </q-dialog>
</template>

<style scoped></style>
