#pragma once
// sample_chrome.h — interior geometry of the Sample face's CHROME band: the toolbar row
// (title + the whole right-anchored control run + Browse) over the strip row, which the
// piano strip has to itself. Reads the band rect the allocator hands it (sample_bands) and
// never allocates vertical space of its own.

#include "core/instrument/ui/editor_geometry.h"  // Rect

namespace reasampler::instrument::ui {

inline constexpr int kNavButtonWidth = 62;  // the Browse toolbar button

// Every interactive rect inside the chrome band, in one pass so draw and hit-test cannot
// derive them differently. The toolbar's fixed run is right-anchored and the title takes
// what is left of that row; the strip row carries nothing but the strip, so the strip grows
// with the window in both directions.
struct ChromeRects {
    Rect toolbar;     // full-width top row
    Rect title;       // the title text slot: the toolbar left of the control run
    Rect preview;     // ---- the right-anchored run, left to right ----
    Rect velCell;     // preview-velocity knob cell (knob + label band)
    Rect velKnob;
    Rect velLabel;
    Rect curveBtn;    // opens the velocity-curve popup
    Rect chanMono;
    Rect chanStereo;
    Rect navBrowse;
    Rect controls;    // full-width second row
    Rect rootStrip;   // the piano strip: the whole row, inset only by the shared band pad
};

// `knobSize` is the deck knob square, passed in so this module does not depend on knob_deck.
ChromeRects chromeRects(const Rect& chrome, int knobSize);

}  // namespace reasampler::instrument::ui
