"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("../tslib.es6-C4EgNkz1.js"),e=require("react"),x=require("classnames"),y=require("../notice-content-C0ZStfuX.js"),j=require("../notice-content-9iF4T8uB.js"),r=require("../utils-C9NL3q0j.js"),F=require("../icon-I30uh1Ov.js"),O=require("../icon-button-AJ6dtyvc.js"),P=require("../icons/ebay-icon-close-16/index.js"),S=require("../icons/ebay-icon-lightbulb-24/index.js"),b=require("../notice-footer-G6VPjVZu.js"),V=t=>{var{children:n,className:i,a11yIconText:o,variant:c="none",iconVariant:l="none",a11yDismissText:m,educationIcon:s=e.createElement(S.EbayIconLightbulb24,{prominent:l==="prominent",a11yText:o,a11yVariant:"label"}),iconClass:C,dismissed:u=!1,onDismiss:h=()=>{}}=t,I=E.__rest(t,["children","className","a11yIconText","variant","iconVariant","a11yDismissText","educationIcon","iconClass","dismissed","onDismiss"]);const[T,q]=e.useState(u),a=r.findComponent(n,y.EbayNoticeContent),d=r.findComponent(n,N),f=r.findComponent(n,p),_=c==="prominent",g=l==="prominent",v=D=>{q(!0),h(D)};if(!d)throw new Error("<EbayEducationNoticeTitle>: Please use a <EbayEducationNoticeTitle> that defines the content of the notice");return T||u?null:e.createElement("section",Object.assign({"aria-roledescription":"Notice"},I,{className:x(i,"education-notice",{"education-notice--prominent":_})}),e.createElement("div",{className:"education-notice__header"},typeof s=="string"?e.createElement(F.EbayIcon,{name:s,className:C,prominent:g,a11yText:o,a11yVariant:"label"}):s,d,m&&e.createElement(O.EbayIconButton,{"aria-label":m,size:"small",className:"education-notice__dismiss",onClick:v,icon:e.createElement(P.EbayIconClose16,null)})),e.createElement(j.NoticeContent,Object.assign({},a?.props,{type:"education"})),f)},N=t=>{var{className:n,as:i,children:o}=t,c=E.__rest(t,["className","as","children"]);return e.createElement(b.NoticeTitle,Object.assign({},c,{className:n,as:i,type:"education"}),o)},p=({className:t,children:n})=>e.createElement(b.NoticeFooter,{className:t,type:"education"},n);exports.EbayNoticeContent=y.EbayNoticeContent;exports.EbayEducationNotice=V;exports.EbayEducationNoticeFooter=p;exports.EbayEducationNoticeTitle=N;
