import type { Note } from "../stores/notes"; // How the signed-in person holds a note (#5174). The owner does everything; someone it // is shared with at `edit` changes the body and checklist; at `view`, nothing. A note // with no permission came from a source without sharing (the offline desktop): it is // the person's own. export function isOwnNote(note: Note): boolean { return (note.permission ?? "owner") === "owner"; } export function canEditText(note: Note): boolean { return (note.permission ?? "owner") !== "view"; }