{"version":3,"sources":["../../../../../src/components/notification-item/parts/Actions.tsx"],"sourcesContent":["import React, { useMemo } from 'react';\nimport { Mounter } from '../../Mounter';\nimport { useNotificationItem } from '../context';\n\n/**\n * The read, archive and snooze controls. An island: the engine renders it into this block, so the dropdowns,\n * tooltips and pickers exist once. Clicks inside it never reach the item's own click handler.\n */\nexport const DefaultActions = () => {\n  const { notification, renderers } = useNotificationItem('DefaultActions');\n  const mountProps = useMemo(() => ({ notification }), [notification]);\n\n  if (renderers.renderDefaultActions) {\n    return <>{renderers.renderDefaultActions(notification)}</>;\n  }\n\n  return <Mounter name=\"NotificationDefaultActions\" props={mountProps} bare />;\n};\n\n/** The primary and secondary action buttons. An island, like the default actions. */\nexport const CustomActions = () => {\n  const { notification, handlers, renderers } = useNotificationItem('CustomActions');\n  const { onPrimaryActionClick, onSecondaryActionClick } = handlers;\n  const mountProps = useMemo(\n    () => ({ notification, onPrimaryActionClick, onSecondaryActionClick }),\n    [notification, onPrimaryActionClick, onSecondaryActionClick]\n  );\n\n  if (renderers.renderCustomActions) {\n    return <>{renderers.renderCustomActions(notification)}</>;\n  }\n\n  return <Mounter name=\"NotificationCustomActions\" props={mountProps} bare />;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA+B;AAC/B,qBAAwB;AACxB,qBAAoC;AAWzB;AALJ,IAAM,iBAAiB,MAAM;AAClC,QAAM,EAAE,cAAc,UAAU,QAAI,oCAAoB,gBAAgB;AACxE,QAAM,iBAAa,sBAAQ,OAAO,EAAE,aAAa,IAAI,CAAC,YAAY,CAAC;AAEnE,MAAI,UAAU,sBAAsB;AAClC,WAAO,2EAAG,oBAAU,qBAAqB,YAAY,GAAE;AAAA,EACzD;AAEA,SAAO,4CAAC,0BAAQ,MAAK,8BAA6B,OAAO,YAAY,MAAI,MAAC;AAC5E;AAGO,IAAM,gBAAgB,MAAM;AACjC,QAAM,EAAE,cAAc,UAAU,UAAU,QAAI,oCAAoB,eAAe;AACjF,QAAM,EAAE,sBAAsB,uBAAuB,IAAI;AACzD,QAAM,iBAAa;AAAA,IACjB,OAAO,EAAE,cAAc,sBAAsB,uBAAuB;AAAA,IACpE,CAAC,cAAc,sBAAsB,sBAAsB;AAAA,EAC7D;AAEA,MAAI,UAAU,qBAAqB;AACjC,WAAO,2EAAG,oBAAU,oBAAoB,YAAY,GAAE;AAAA,EACxD;AAEA,SAAO,4CAAC,0BAAQ,MAAK,6BAA4B,OAAO,YAAY,MAAI,MAAC;AAC3E;","names":[]}