blob: 1f3966bf59e4a4c741eb3f3cf8122cfa9b28b7d7 [file] [log] [blame]
<style include="cr-hidden-style">
:host {
align-items: center;
display: flex;
flex-direction: column;
}
sp-empty-state {
width: 229px;
}
user-note-overviews-list,
user-notes-list {
align-self: stretch;
flex: 1;
}
</style>
<template is="dom-if"
if="[[shouldShowEmptyOrGuestState(state_, viewingOverviews_)]]"
restamp>
<sp-empty-state
guest$="[[isGuestMode_()]]"
image-path="./images/user_notes_empty.svg"
dark-image-path="./images/user_notes_empty_dark.svg"
heading="[[getEmptyTitle_()]]"
body="[[getEmptyBody_()]]">
</sp-empty-state>
</template>
<template is="dom-if"
if="[[shouldShowAddButton_(state_, notes_)]]">
<cr-button
aria-label="$i18n{addANote}"
class="floating-button"
hidden="[[isGuestMode_()]]"
on-click="onAddNoteButtonClick_">
<iron-icon slot="prefix-icon" icon="cr:add"></iron-icon>
$i18n{addANote}
</cr-button>
</template>
<template is="dom-if"
if="[[shouldShowOverviews_(state_)]]"
restamp>
<user-note-overviews-list overviews="[[overviews_]]"
on-current-tab-overview-selected="onCurrentTabOverviewSelected_"
on-start-note-creation="onStartNoteCreation_">
</user-note-overviews-list>
</template>
<template is="dom-if"
if="[[shouldShowPageNotes_(state_)]]"
restamp>
<user-notes-list id="pageNotesList" notes="[[notes_]]"
on-all-notes-click="onAllNotesClick_"
first-note-creation="[[!hasNotesInAnyPages_]]"
start-note-creation="{{startNoteCreation_}}">
</user-notes-list>
</template>