// Mobile redesign — filter sheet.
// Reuses <window.Sidebar/> verbatim, wrapped in the existing `.r-sidebar`
// drawer shell so the slide-in/backdrop CSS from index.html applies.

function MobileFilterSheet({ open, profile, setProfile, onReset, onClose, t, lang, setLang, dark, products }) {
  return (
    <>
      <div
        className={`r-backdrop${open ? " is-open" : ""}`}
        onClick={onClose}
      />
      <div
        className={`r-sidebar${open ? " is-open" : ""}`}
        style={{ display: "flex", flexShrink: 0 }}
      >
        {window.Sidebar && (
          <window.Sidebar
            profile={profile}
            setProfile={setProfile}
            t={t}
            lang={lang}
            setLang={setLang}
            dark={dark}
            onReset={onReset}
            onClose={onClose}
            products={products}
          />
        )}
      </div>
    </>
  );
}

Object.assign(window, { MobileFilterSheet });
