<template>
  <div class="content">
    <div class="admin-page-title point-font2 mb30">
      <p>약관 관리</p>
    </div>
    <div class="search-bar mb15">
      <div class="flex justify-end align-center no-gutters">
        <div class="gd-6 mr10">
          <div class="border">
            <select name="" id="" class="border-none gd-2">
              <option value="">전체</option>
            </select>
            <input
              type="text"
              class="full-input border-none gd-10 condition-input"
            />
          </div>
        </div>
        <div class="gd-1">
          <button class="large-btn blue-border-btn">검색</button>
        </div>
      </div>
    </div>
    <ListTable
      :colgroup="colgroup"
      :thead="thead"
      :tbody="tbody"
      :className="'admin-list'"
    />
    <div class="flex justify-between align-center no-gutters">
      <div class="gd-1"></div>
      <div class="gd-10">
        <PaginationButton :className="'admin-pagination'" />
      </div>
      <div class="gd-1">
        <button
          class="large-btn blue-btn"
          @click="insertPage"
          v-if="pageAuth.regAuthrt == 'Y'"
        >
          등록
        </button>
      </div>
    </div>
  </div>
</template>

<script>
import ListTable from "../../../../component/table/ListTable.vue";
import PaginationButton from "../../../../component/pagination/PaginationButton.vue";
export default {
  data() {
    return {
      // 페이지 권한 객체
      pageAuth: JSON.parse(localStorage.getItem("vuex")).pageAuth,

      colgroup: ["5%", "19%", "19%", "15%", "10%", "8%"],
      thead: ["NO", "제목", "순서", "사용유무", "작성자", "작성일"],

      tbody: [
        {
          id: 1,
          company: "약관관리1",
          name: "1",
          satus: "정상",
          "whether ": "관리자1",
          "date ": "2024-01-01",
        },
        {
          id: 2,
          company: "약관관리1",
          name: "1",
          satus: "정상",
          "whether ": "관리자1",
          "date ": "2024-01-01",
        },
        {
          id: 3,
          company: "약관관리1",
          name: "1",
          satus: "정상",
          "whether ": "관리자1",
          "date ": "2024-01-01",
        },
      ],
    };
  },
  methods: {
    passwordReset: function () {},
    insertPage: function () {
      this.$router.push({ path: "/invest/adm/termsManagementInsert.page", query: {} });
    },
  },
  watch: {},
  computed: {},
  components: {
    ListTable: ListTable,
    PaginationButton: PaginationButton,
  },
  mounted() {},
};
</script>