{
  "version": 3,
  "sources": ["../../src/utils/split-widget-actions.ts"],
  "sourcesContent": ["import type { WidgetAction, WidgetType } from '@wordpress/widget-primitives';\n\n/**\n * Splits a widget type's actions across the chrome surfaces: the footer\n * takes `relevance: 'high'` and `'medium'`, the More menu the rest.\n * Full-bleed widgets have no footer, so every action stays in the menu.\n *\n * @param widgetType The widget type whose actions are routed.\n */\nexport function splitWidgetActions( widgetType?: WidgetType ): {\n\tfooter: WidgetAction[];\n\tmenu: WidgetAction[];\n} {\n\tconst actions = widgetType?.actions ?? [];\n\n\tif ( widgetType?.presentation === 'full-bleed' ) {\n\t\treturn { footer: [], menu: actions };\n\t}\n\n\tconst isPromoted = ( action: WidgetAction ) =>\n\t\taction.relevance === 'high' || action.relevance === 'medium';\n\n\treturn {\n\t\tfooter: actions.filter( isPromoted ),\n\t\tmenu: actions.filter( ( action ) => ! isPromoted( action ) ),\n\t};\n}\n"],
  "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AASO,SAAS,mBAAoB,YAGlC;AACD,QAAM,UAAU,YAAY,WAAW,CAAC;AAExC,MAAK,YAAY,iBAAiB,cAAe;AAChD,WAAO,EAAE,QAAQ,CAAC,GAAG,MAAM,QAAQ;AAAA,EACpC;AAEA,QAAM,aAAa,CAAE,WACpB,OAAO,cAAc,UAAU,OAAO,cAAc;AAErD,SAAO;AAAA,IACN,QAAQ,QAAQ,OAAQ,UAAW;AAAA,IACnC,MAAM,QAAQ,OAAQ,CAAE,WAAY,CAAE,WAAY,MAAO,CAAE;AAAA,EAC5D;AACD;",
  "names": []
}
