"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("../tslib.es6-C4EgNkz1.js"),e=require("react"),f=require("classnames"),q=require("../notice-content-9iF4T8uB.js"),r=require("../notice-content-C0ZStfuX.js"),I=require("../utils-C9NL3q0j.js"),P=require("../icons/ebay-icon-close-16/index.js"),_=require("../icons/ebay-icon-attention-filled-16/index.js"),h=require("../icons/ebay-icon-confirmation-filled-16/index.js"),F=require("../icons/ebay-icon-information-filled-16/index.js"),l=require("../notice-footer-G6VPjVZu.js"),T=require("../notice-cta-CKl_qBge.js"),D={attention:_.EbayIconAttentionFilled16,confirmation:h.EbayIconConfirmationFilled16,information:F.EbayIconInformationFilled16},A=t=>{var{id:a,status:n="general",children:o,a11yDismissText:i,"aria-label":m,onDismiss:y=()=>{},className:u}=t,E=c.__rest(t,["id","status","children","a11yDismissText","aria-label","onDismiss","className"]);const[d,g]=e.useState(!1),s=I.findComponent(o,r.EbayNoticeContent);if(!s)throw new Error("EbayPageNotice: Please use a EbayNoticeContent that defines the content of the notice");const N=p=>{g(!0),y(p)},C=n!=="general"?D[n]:null;return d?null:e.createElement("section",Object.assign({},E,{"aria-labelledby":a||`${n}-status`,className:f("page-notice",u,{[`page-notice--${n}`]:n!=="general"})}),n!=="general"?e.createElement("div",{className:"page-notice__header",id:a||`${n}-status`},e.createElement(C,{a11yText:m,a11yVariant:"label"})):null,e.createElement(q.NoticeContent,Object.assign({},s.props,{type:"page"})),o,i&&e.createElement(b,null,e.createElement("button",{"aria-label":i,className:"fake-link page-notice__dismiss",onClick:N},e.createElement(P.EbayIconClose16,null))))},j=t=>{var{className:a,as:n,children:o}=t,i=c.__rest(t,["className","as","children"]);return e.createElement(l.NoticeTitle,Object.assign({},i,{className:a,as:n,type:"page"}),o)},b=({className:t,children:a})=>e.createElement(l.NoticeFooter,{className:t,type:"page"},a),v=({className:t,children:a})=>e.createElement(T.NoticeCTA,{className:t,type:"page"},a);exports.EbayNoticeContent=r.EbayNoticeContent;exports.EbayPageNotice=A;exports.EbayPageNoticeCTA=v;exports.EbayPageNoticeFooter=b;exports.EbayPageNoticeTitle=j;
