import React from 'react'; interface SelectedWidget { uid: string; type: string; settings: Record; } interface SharableRoute { id: string; name: string; path?: string; } interface PlacementRow { uuid: string; route: string; area: string; sortOrder: number; } interface SettingsDrawerProps { widget: SelectedWidget; currentRouteId: string; /** * The editor's active draft changeset token. Passed to `widgetByUuid` so the * Share panel reads DRAFT-applied placements (staged route toggles included), * keeping the checkboxes in sync with the iframe rather than the published * `widget_placement` table. */ changesetToken?: string; shareableRoutes: SharableRoute[]; pinned: boolean; onTogglePin: () => void; onAddPlacement: (route: string, placementUuid: string, area: string, sortOrder?: number) => Promise; onRemovePlacement: (placementUuid: string) => Promise; onClose: () => void; /** * Optional initial placements seed for INSTANT feedback before the * (overlay-aware) `widgetByUuid` query resolves. The Editor passes the * overlay-applied placements it already has. Also covers a freshly-dropped * widget, which isn't in the published table yet, so `widgetByUuid` returns * null for it until publish. */ initialPlacements?: PlacementRow[]; /** * The widget type's registered display name (e.g. "Collection products"), * looked up from `widgetTypes` by the Editor. Used (translated via `_()`) as * the drawer title; when absent we fall back to a title-cased form of the * type code. */ widgetTypeName?: string; /** * Optional ref forwarded to the drawer's outer `