<template>
  <a @click="handleChange" type="text" :class="['sider-trigger-a', collapsed ? 'collapsed' : '']"><Icon :type="icon" :size="size" /></a>
</template>
<script lang="ts">
import { Component, Prop, Vue, Emit, Watch } from "vue-property-decorator";

@Component
export default class siderTrigger extends Vue {
  
  @Prop(Boolean) private collapsed! : boolean;
  @Prop({type:String,default:'navicon-round'}) private icon!:string;
  @Prop({type:Number,default:26}) private size! : number;

  @Emit('on-change') change(state : boolean){}
  handleChange(){
    this.change(!this.collapsed)
  }
}
</script>

