/** * @license * Copyright 2026 Aglyn LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * File ▸ Discard changes… for every besigner editor (AGL-3723). * * Puts the canvas back to the stored document — the published tree on the * live version, the last save on any other — and drops the local and shared * drafts, after a confirm because the reset cannot be undone. * `useBesignerDocument().discardChanges` does the document half; the editor * passes what only it owns: the co-editing mirror and its own "draft saved" * flag. */ export declare function useDiscardChangesMenuItem(options: { noun: string; /** Editing the version the sites serve, where the stored tree is live. */ live: boolean; /** `useBesignerDocument().canDiscard`, plus any draft state the editor keeps. */ canDiscard: boolean; discardChanges: () => boolean; /** Clears what the editor owns: the mirror, a draft-saved flag. */ onDiscarded?: () => void; }): { onClick: () => Promise; ListItemTextProps: { inset: boolean; secondary?: undefined; }; id: string; children: string; disabled: boolean; } | { onClick: () => Promise; ListItemTextProps: { inset: boolean; secondary: string; }; id: string; children: string; disabled: boolean; }; export default useDiscardChangesMenuItem;