/**
 * SyntroBottomSheet — mobile-mode equivalent of {@link SyntroDrawer}.
 *
 * On phone-sized viewports a side-aligned 380px panel feels foreign.
 * Visitors expect the iOS / Telegram pattern: tap launcher → sheet rises
 * from the bottom edge, three snap points (peek / mid / full), drag-handle
 * dismiss, and nested-scroll handoff so dragging on long content scrolls
 * the content first and only takes over the sheet once the content has
 * reached its top.
 *
 * **Geometry:** ``position: fixed; left:0; right:0; bottom:0;
 * height: 100svh`` with a vertical ``translateY()`` to position the
 * **top edge** of the sheet at the active snap point. ``height = 100svh``
 * keeps the sheet's bottom anchored even when the snap point moves —
 * the content area below the handle just expands. ``svh`` (small
 * viewport height) is used instead of ``dvh`` so the sheet doesn't
 * jump when the mobile browser chrome (URL bar) appears or hides.
 * Inner padding uses ``env(safe-area-inset-bottom)`` so the iPhone
 * home indicator doesn't eat the last row of tiles.
 *
 * **Snap points** (svh percentages, peek default 30, mid 70, full 95)
 * are configurable via ``theme.canvas.snapPoints``. ``peek`` is the
 * lowest position the sheet rests at — dragging below peek with a
 * downward velocity dispatches ``canvas-toggle`` (close) rather than
 * snapping back. The translateY is computed as ``(100 - snapVh)svh``.
 *
 * **Drag handle** is a 44px-tall touch target across the top, matching
 * Apple's recommended minimum for finger taps. ``pointerdown`` here
 * always treats the gesture as sheet drag — no nested-scroll
 * negotiation. The grabber pill (4×40px) inside it is purely visual.
 *
 * **Drag on content** uses the standard iOS handoff: when the touch
 * lands inside the content scroll container *and* the container has
 * ``scrollTop > 0``, the content scrolls and the sheet stays put. Once
 * the content reaches ``scrollTop === 0`` and the user keeps dragging
 * down, the sheet takes over (decided lazily at first ``pointermove``).
 *
 * **Snap-on-release** computes velocity from the last ~100ms of
 * pointermove samples. ``|velocity| > 0.5px/ms`` → step one snap in the
 * fling direction. Otherwise → nearest snap by current position. Below
 * peek with downward intent → dismiss.
 *
 * **Animation** reuses ``themeConfig.canvas.transitionDuration`` and
 * ``transitionEasing`` (same tokens as the drawer). Transition is
 * disabled during active drag and re-enabled at release so the snap
 * animates smoothly.
 *
 * Decorator-free (matches drawer): uses ``static override properties``.
 */
import { LitElement, nothing } from 'lit';
import type { SmartCanvasRuntime } from '../runtime.js';
import type { TelemetryClient } from '../telemetry/types.js';
import type { TileConfig } from '../types.js';
import './SyntroTileStack.js';
export interface BottomSheetSnapPoints {
    /** Lowest rest position. Drag below this with downward intent → dismiss. */
    peek?: number;
    /** Default open position when the sheet first appears. */
    mid?: number;
    /** Maximum height. Sheet won't grow past this even if dragged up further. */
    full?: number;
}
export interface BottomSheetThemeConfig {
    canvas: {
        transitionDuration?: string;
        transitionEasing?: string;
        border?: string;
        blur?: string;
        snapPoints?: BottomSheetSnapPoints;
        backdrop?: boolean;
        backdropColor?: string;
    };
}
type SnapName = 'peek' | 'mid' | 'full';
export declare class SyntroBottomSheet extends LitElement {
    static properties: {
        isOpen: {
            type: BooleanConstructor;
        };
        tiles: {
            attribute: boolean;
        };
        isLoading: {
            type: BooleanConstructor;
        };
        error: {
            type: StringConstructor;
        };
        canvasTitle: {
            type: StringConstructor;
        };
        runtimeRef: {
            attribute: boolean;
        };
        telemetry: {
            attribute: boolean;
        };
        themeConfig: {
            attribute: boolean;
        };
        snap: {
            attribute: boolean;
        };
        dragOffsetVh: {
            attribute: boolean;
        };
        isDragging: {
            attribute: boolean;
        };
        _visible: {
            attribute: boolean;
        };
    };
    isOpen: boolean;
    tiles: TileConfig[];
    isLoading: boolean;
    error: string | undefined;
    canvasTitle: string | undefined;
    runtimeRef: SmartCanvasRuntime | null;
    telemetry: TelemetryClient | null;
    themeConfig: BottomSheetThemeConfig;
    snap: SnapName;
    /** Live drag offset in vh — added to the active snap's translateY
     *  during an in-progress drag. Reset to 0 on release. */
    dragOffsetVh: number;
    isDragging: boolean;
    /** Keeps the DOM alive during exit transition. Set true on open,
     *  set false after exit animation completes or times out. */
    _visible: boolean;
    private _activePointerId;
    private _dragStartY;
    private _dragStartSnap;
    private _samples;
    /** True once the gesture has committed to dragging the sheet. Used to
     *  defer the nested-scroll-vs-sheet decision until the first move. */
    private _gestureCommitted;
    /** True if the pointerdown landed on the drag handle. Handle gestures
     *  always commit to sheet-drag without nested-scroll negotiation. */
    private _gestureFromHandle;
    /** Cached scroll container ref so we can check ``scrollTop`` cheaply
     *  during pointermove without re-querying. */
    private _scrollEl;
    /** Saved body overflow value before we apply scroll lock. */
    private _savedBodyOverflow;
    private _entryRafId;
    private _exitTimer;
    private _onDocumentMousedown;
    private _onScrimClick;
    createRenderRoot(): this;
    private get _canvas();
    private get _duration();
    private get _easing();
    private get _border();
    private get _blur();
    /** Bottom sheets always overlay page content, so ``transparent``
     *  (common in push-layout drawer configs) is replaced with a visible
     *  fallback derived from the overlay background. */
    private get _background();
    private get _backdrop();
    private get _backdropColor();
    /** Resolved snap-point heights (vh). */
    private get snapPoints();
    /** Top-edge position in vh (from top of viewport) for the active snap
     *  plus any in-progress drag offset. Higher value = sheet sits lower. */
    private get _topEdgeVh();
    connectedCallback(): void;
    disconnectedCallback(): void;
    updated(changed: Map<string, unknown>): void;
    private _lockBodyScroll;
    private _unlockBodyScroll;
    private _scheduleEntryTransition;
    private _scheduleExitTransition;
    private _cancelExitTransition;
    /** Convert a vertical pointer delta (px, downward = positive) to a vh
     *  offset. Used during drag and for velocity calculations. */
    private _pxToVh;
    /** Velocity in vh/ms over the last ``VELOCITY_SAMPLE_WINDOW_MS``. */
    private _computeVelocityVhPerMs;
    /** Pick the destination snap from the current top-edge position
     *  (without drag offset overriding the active snap), velocity, and
     *  fling threshold. Returns ``null`` to indicate dismiss. */
    private _decideSnapOnRelease;
    /** Adapter: ``_computeVelocityVhPerMs`` returns vh/ms; the threshold is
     *  expressed in px/ms (matching existing iOS conventions). Convert
     *  back so the comparison is unit-correct. */
    private _pxToVelocityForDecision;
    private _onPointerDown;
    private _onPointerMove;
    private _onPointerUp;
    render(): import("lit-html").TemplateResult<1> | typeof nothing;
}
declare global {
    interface HTMLElementTagNameMap {
        'syntro-bottom-sheet': SyntroBottomSheet;
    }
}
export {};
