<template>
  <app-cascader
    id="e725d2a91b8248f4b8f49889038df7de"
    ref="cascaderRef"
    v-model="modelValue"
    :check-strictly="checkStrictly"
    :control-level="controlLevel"
    :show-all-levels="false"
    :level="level"
    :join-separator="joinSeparator"
    value="bianma"
  />
</template>

<script setup>
import { useTemplateRef } from "vue";
import AppCascader from "@/components/cascader/index.vue";

defineOptions({
  name: "AppAreaCascader",
});
defineProps({
  checkStrictly: {
    type: Boolean,
    default: false,
  },
  controlLevel: {
    type: Boolean,
    default: false,
  },
  level: {
    type: [Number, String],
    default: 3,
  },
  joinSeparator: {
    type: String,
    default: "/",
  },
});
const modelValue = defineModel({
  type: Array,
  required: true,
  default: () => [],
});
const cascaderRef = useTemplateRef("cascaderRef");
const getCheckedNodes = () => {
  return cascaderRef.value.getCheckedNodes();
};
defineExpose({
  getCheckedNodes,
});
</script>

<style scoped></style>
