#pragma once
// panel_window — window-lifecycle seam of the docked bank panel: owns the SWELL
// dialog (dock/undock, toggle), the drop-target opt-in, and the dialog proc that
// routes to the input/drag/render seams. Panel never inserts into the arrange or
// mutates the project. Header is REAPER-free; main.cpp drives it via these
// free functions.

namespace reasampler {

class ReaSamplerSession;

// `session` must outlive the panel (extension-lifetime g_session). Call once
// after API pointers load, before the toggle action registers.
void bankPanelInit(ReaSamplerSession* session);

// Creates+docks if hidden, hides+undocks if shown.
void bankPanelToggle();

// Feeds the toggle action's checked-state.
bool bankPanelIsOpen();

// No-op if closed. Called after a mode change so the footer reflects it without
// a hide/reshow.
void bankPanelInvalidate();

// Mirror of bankPanelInit; safe if never opened.
void bankPanelShutdown();

}  // namespace reasampler
