import { VuexModule, Mutation, getModule } from 'vuex-module-decorators';
import DynamicModule from '../DynamicModule';

@DynamicModule({ name: 'summaryLayout' })
export class SummaryLayout extends VuexModule {
  subjectTreeSize = 60
  mainContentSize = 300
  mainLeftSize = 150
  mainRightSize = 50
  mainLeftTopSize = 300
  mainLeftBottomSize = 50

  // 右侧标准清单可见性
  rightStdBillVisible = false
  // 右侧定额库可见性
  rightLibRationVisible = false

  @Mutation
  setSubjectTreeSize(size: number) {
    this.subjectTreeSize = size
  }

  @Mutation
  setMainContentSize(size: number) {
    this.mainContentSize = size
  }

  @Mutation
  setMainLeftSize(size: number) {
    this.mainLeftSize = size
  }

  @Mutation
  setMainRightSize(size: number) {
    this.mainRightSize = size
  }

  @Mutation
  setMainLeftTopSize(size: number) {
    this.mainLeftTopSize = size
  }

  @Mutation
  setMainLeftBottomSize(size: number) {
    this.mainLeftBottomSize = size
  }

  @Mutation
  setRightStdBillVisible(visible: boolean) {
    this.rightStdBillVisible = visible
  }

  @Mutation
  setRightLibRationVisible(visible: boolean) {
    this.rightLibRationVisible = visible
  }
}

export default getModule<SummaryLayout>(SummaryLayout);
