import NoteContextAwareWidget from "../note_context_aware_widget.js"; import NoteTypeWidget from "../note_type.js"; import ProtectedNoteSwitchWidget from "../protected_note_switch.js"; const TPL = `
`; export default class BasicPropertiesWidget extends NoteContextAwareWidget { constructor() { super(); this.noteTypeWidget = new NoteTypeWidget(); this.protectedNoteSwitchWidget = new ProtectedNoteSwitchWidget(); this.child(this.noteTypeWidget, this.protectedNoteSwitchWidget); } isEnabled() { return this.note; } getTitle() { return { show: this.isEnabled(), title: 'Basic Properties', icon: 'bx bx-slider' }; } doRender() { this.$widget = $(TPL); this.overflowing(); this.$widget.find(".note-type-container").append(this.noteTypeWidget.render()); this.$widget.find(".protected-note-switch-container").append(this.protectedNoteSwitchWidget.render()); } }