import{a as e,n as t}from"./chunk-BneVvdWh.js";import{t as n}from"./react-C7IZe2D1.js";import{ht as r,t as i}from"./dist-DtfJeYQK.js";import{t as a}from"./jsx-runtime-C2wGStra.js";import{n as o,t as s}from"./dist-Cc1j9Pjk.js";import{n as c,t as l}from"./Icon-0Ag8a3l4.js";import{n as u,t as d}from"./Text-DO3xXyuu.js";import{n as ee,t as te}from"./TokyoUIClose-BsMsQk2w.js";import{o as ne,r as f}from"./lib-8ue2PVWI.js";import{n as p,t as m}from"./shared-strings-BFfhcoGp.js";import{n as h,t as g}from"./TokyoUICheck-BxTDosuA.js";import{i as _,n as v,r as y,t as b}from"./TokyoUIErrorWarning-BH93ehx8.js";import{n as x,t as S}from"./IconButton-DZfzVk_P.js";import{n as C,t as re}from"./TokyoUIInfo-CL0Zo7ru.js";var w,T,E,D,O=t((()=>{w=`banner__X9HSx`,T=`icon__Hc4CV`,E=`dismissButton__QqYFY`,D={banner:w,icon:T,dismissButton:E}})),k,A,j,M,N=t((()=>{k=e(n(),1),i(),s(),O(),A=a(),j=(0,k.createContext)({variant:`neutral`,size:`regular`}),M=(0,k.forwardRef)(function({variant:e=`neutral`,size:t=`regular`,children:n,dataset:i,className:a=``,...s},c){let l=[D.banner,a].join(` `);return(0,A.jsx)(j.Provider,{value:{variant:e,size:t},children:(0,A.jsx)(`div`,{ref:c,role:`note`,className:l,...r(i,{preplyDsComponent:o.CalloutBanner}),"data-variant":e,"data-size":t,...s,children:n})})});try{M.displayName=`CalloutBannerRoot`,M.__docgenInfo={description:`The root primitive for the callout banner.

This component is used to create a custom callout banner; it accepts a
\`className prop to override the default styles for the callout banner
container. The \`variant\` prop is exposed as a data attribute on the root
element to aid in styling.

You can use the other \`CalloutBanner*\` subcomponents as you normally would
with the \`CalloutBanner\` component.`,displayName:`CalloutBannerRoot`,props:{variant:{defaultValue:{value:`neutral`},description:`The banner variant/type`,name:`variant`,required:!1,type:{name:`enum`,value:[{value:`"neutral"`},{value:`"info"`},{value:`"ai"`},{value:`"positive"`},{value:`"warning"`},{value:`"critical"`}]}},size:{defaultValue:{value:`regular`},description:`The banner size`,name:`size`,required:!1,type:{name:`enum`,value:[{value:`"small"`},{value:`"regular"`}]}},dataset:{defaultValue:null,description:`Data attributes for testing/analytics
@deprecated Pass data attributes as regular props instead`,name:`dataset`,required:!1,type:{name:`enum`,value:[{value:`Dataset`}]}}}}}catch{}})),P,F,I,L=t((()=>{P=e(n(),1),N(),F=a(),I=(0,P.forwardRef)(function({variant:e=`neutral`,size:t=`regular`,children:n,dataset:r},i){return(0,F.jsx)(M,{ref:i,variant:e,size:t,dataset:r,children:n})});try{I.displayName=`CalloutBanner`,I.__docgenInfo={description:`The Callout banner is used to share informational, helpful, or promotional
messages within a product interface.

It appears inline within a page or section, not at the top of the screen.
Its goal is to draw gentle attention without overpowering surrounding content.

Do not use for urgent or blocking information—use the \`<AlertBanner />\` instead.`,displayName:`CalloutBanner`,props:{variant:{defaultValue:{value:`neutral`},description:"The banner variant.\nSemantic icons are also exported for the following variants:\n- `info` -> `<CalloutBannerInfoIcon />`\n- `warning` -> `<CalloutBannerWarningIcon />`\n- `critical` -> `<CalloutBannerCriticalIcon />`\n- `positive` -> `<CalloutBannerPositiveIcon />`",name:`variant`,required:!1,type:{name:`enum`,value:[{value:`"neutral"`},{value:`"info"`},{value:`"ai"`},{value:`"positive"`},{value:`"warning"`},{value:`"critical"`}]}},size:{defaultValue:{value:`regular`},description:`The banner text size.`,name:`size`,required:!1,type:{name:`enum`,value:[{value:`"small"`},{value:`"regular"`}]}},children:{defaultValue:null,description:`The banner message content.

To build a DS compliant banner, use:
- \`CalloutBannerIcon\` to add an icon to the banner
- \`CalloutBannerText\` to add a text to the banner
- \`CalloutBannerDismissButton\` to add a dismiss button to the banner

Alternatively, to diverge from the DS, you're able to:
- Add your own custom content to break away from the inner content
  styling and structure.
- Use the \`CalloutBannerRoot\` primitive to customize the banner
  container (e.g. colour).`,name:`children`,required:!0,type:{name:`enum`,value:[{value:`undefined`},{value:`null`},{value:`string`},{value:`number`},{value:`false`},{value:`true`},{value:`ReactElement<any, string | JSXElementConstructor<any>>`},{value:`Iterable<ReactNode>`},{value:`ReactPortal`}]}},dataset:{defaultValue:null,description:``,name:`dataset`,required:!1,type:{name:`enum`,value:[{value:`Dataset`}]}}}}}catch{}})),R,z,B,V,H=t((()=>{R=e(n(),1),f(),ee(),x(),p(),O(),z=a(),B=(0,R.forwardRef)(function({children:e,className:t=``,...n},r){return(0,z.jsx)(`div`,{ref:r,className:[D.dismissButton,t].join(` `),children:e??(0,z.jsx)(V,{...n})})}),V=(0,R.forwardRef)(function({onClick:e,dataset:t},n){let{formatMessage:r}=ne();return(0,z.jsx)(S,{ref:n,onClick:e,svg:te,size:`small`,variant:`ghost`,assistiveText:r(m.close),dataset:t})});try{B.displayName=`CalloutBannerDismissButton`,B.__docgenInfo={description:"A dismiss button for the callout banner.\n\nNote: The root of this component is a `div` element. It renders the default\ndismiss button by default, but you can override it with the `children` prop.\nYou can also use the `className` prop to override the default styles for the\ncontainer.",displayName:`CalloutBannerDismissButton`,props:{children:{defaultValue:null,description:`If present, the component will render the children instead of the
default dismiss button.`,name:`children`,required:!1,type:{name:`enum`,value:[{value:`null`},{value:`string`},{value:`number`},{value:`false`},{value:`true`},{value:`ReactElement<any, string | JSXElementConstructor<any>>`},{value:`Iterable<ReactNode>`},{value:`ReactPortal`}]}},className:{defaultValue:{value:``},description:`A class name to apply to the dismiss button **container**.`,name:`className`,required:!1,type:{name:`enum`,value:[{value:`string`}]}},onClick:{defaultValue:null,description:``,name:`onClick`,required:!1,type:{name:`enum`,value:[{value:`() => void`}]}},dataset:{defaultValue:null,description:``,name:`dataset`,required:!1,type:{name:`enum`,value:[{value:`Dataset`}]}}}}}catch{}})),U,W,G,K,q,J,Y,X,ie=t((()=>{U=e(n(),1),C(),v(),_(),h(),c(),O(),N(),W=a(),G=()=>(0,W.jsx)(l,{svg:re,size:`24`}),K=()=>(0,W.jsx)(l,{svg:g,size:`24`}),q=()=>(0,W.jsx)(l,{svg:b,size:`24`}),J=()=>(0,W.jsx)(l,{svg:y,size:`24`}),Y={info:G,positive:K,warning:q,critical:J},X=(0,U.forwardRef)(function({svg:e,children:t,className:n=``},r){let{variant:i}=(0,U.useContext)(j),a=[D.icon,n].join(` `),o=null;return t?o=t:e?o=(0,W.jsx)(l,{svg:e,size:`24`}):i&&i in Y&&(o=Y[i]()),o?(0,W.jsx)(`div`,{ref:r,className:a,children:o}):null});try{G.displayName=`CalloutBannerInfoIcon`,G.__docgenInfo={description:`Info icon for the CalloutBanner.`,displayName:`CalloutBannerInfoIcon`,props:{}}}catch{}try{K.displayName=`CalloutBannerPositiveIcon`,K.__docgenInfo={description:`Positive icon for the CalloutBanner.`,displayName:`CalloutBannerPositiveIcon`,props:{}}}catch{}try{q.displayName=`CalloutBannerWarningIcon`,q.__docgenInfo={description:`Warning icon for the CalloutBanner.`,displayName:`CalloutBannerWarningIcon`,props:{}}}catch{}try{J.displayName=`CalloutBannerCriticalIcon`,J.__docgenInfo={description:`Critical icon for the CalloutBanner.`,displayName:`CalloutBannerCriticalIcon`,props:{}}}catch{}try{X.displayName=`CalloutBannerIcon`,X.__docgenInfo={description:"An icon for the callout banner.\n\nThis component will render the appropriate icon based on the parent\n`CalloutBanner` component's `variant` prop — these semantic icons are also\nexported for the following variants:\n- `info` -> `<CalloutBannerInfoIcon />`\n- `positive` -> `<CalloutBannerPositiveIcon />`\n- `warning` -> `<CalloutBannerWarningIcon />`\n- `critical` -> `<CalloutBannerCriticalIcon />`\n\nThe icon can be overridden by passing a custom SVG icon via the `svg` prop.\n\nIf you want to place any leading element inside of the `CalloutBanner`,\nwith the same spacing as the icon, you can pass it as a child element.\n\nNote: The root of this component is a `div` element. You can use the\n`className` prop to override the default styles for the **container**.",displayName:`CalloutBannerIcon`,props:{svg:{defaultValue:null,description:``,name:`svg`,required:!1,type:{name:`enum`,value:[{value:`ComponentClass<SVGAttributes<SVGElement>, any>`},{value:`FunctionComponent<SVGAttributes<SVGElement>>`},{value:`ReactElement<any, string | JSXElementConstructor<any>>`}]}},className:{defaultValue:{value:``},description:``,name:`className`,required:!1,type:{name:`enum`,value:[{value:`string`}]}}}}}catch{}})),Z,Q,$,ae=t((()=>{Z=e(n(),1),u(),N(),Q=a(),$=(0,Z.forwardRef)(function(e,t){let{size:n}=(0,Z.useContext)(j);return(0,Q.jsx)(d,{ref:t,variant:n===`small`?`small-regular`:`default-regular`,...e})});try{$.displayName=`CalloutBannerText`,$.__docgenInfo={description:"A `Text` component alias for the callout banner that is context-aware,\nadjusting its own `variant` based on the parent `CalloutBanner`'s `size`.",displayName:`CalloutBannerText`,props:{variant:{defaultValue:null,description:``,name:`variant`,required:!1,type:{name:`enum`,value:[{value:`"caption-regular"`},{value:`"caption-semibold"`},{value:`"small-regular"`},{value:`"small-regular-italic"`},{value:`"small-semibold"`},{value:`"small-semibold-italic"`},{value:`"default-regular"`},{value:`"default-regular-italic"`},{value:`"default-semibold"`},{value:`"default-semibold-italic"`},{value:`"large-regular"`},{value:`"large-regular-italic"`},{value:`"large-semibold"`},{value:`"large-semibold-italic"`},{value:`ResponsiveProp<TextVariant>`}]}},accent:{defaultValue:null,description:``,name:`accent`,required:!1,type:{name:`enum`,value:[{value:`"placeholder"`},{value:`"info"`},{value:`"positive"`},{value:`"warning"`},{value:`"critical"`},{value:`"accentDark"`},{value:`"inverted"`},{value:`"primary"`},{value:`"secondary"`},{value:`"tertiary"`}]}},strong:{defaultValue:null,description:``,name:`strong`,required:!1,type:{name:`enum`,value:[{value:`false`},{value:`true`}]}},ellipsed:{defaultValue:null,description:``,name:`ellipsed`,required:!1,type:{name:`enum`,value:[{value:`false`},{value:`true`}]}},centered:{defaultValue:null,description:``,name:`centered`,required:!1,type:{name:`enum`,value:[{value:`false`},{value:`true`},{value:`ResponsiveProp<boolean>`}]}},tag:{defaultValue:null,description:``,name:`tag`,required:!1,type:{name:`enum`,value:[{value:`"div"`},{value:`"p"`},{value:`"span"`}]}},dataset:{defaultValue:null,description:`@deprecated Pass data attributes as regular props instead`,name:`dataset`,required:!1,type:{name:`enum`,value:[{value:`Dataset`}]}},className:{defaultValue:null,description:``,name:`className`,required:!1,type:{name:`enum`,value:[{value:`string`}]}}}}}catch{}}));export{G as a,ie as c,I as d,L as f,X as i,B as l,N as m,ae as n,K as o,M as p,J as r,q as s,$ as t,H as u};