import DictionariesBehavior from "../../../../core/behavior/dictionaries.behavior";

// module/user/components/user-data-edit/user-data-edit.ts
Component({
  behaviors: ['wx://form-field-group', DictionariesBehavior],
  properties: {
    model: { type: Object, value: {} },
    retractable: { type: Boolean, value: false },
    dirty: { type: Boolean, value: false },
  },
  data: {
    expanded: false,
    showSpecialPeriodPicker: true,
  },
  observers: {
    'model.sex'(value) {
      const showSpecialPeriodPicker = value === '1';
      this.setData({ showSpecialPeriodPicker })
    }
  },
  methods: {
    onExpand() {
      this.setData({ expanded: true });
    }
  }
})