(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5388],{2951:function(e,a,n){"use strict";n.r(a),n.d(a,{default:function(){return PreviewTag_PreviewTag}});var t=n(4194),r=n(1599),o=n(1325),i=n(7561),c=n.n(i),s=n(1549),PreviewTag_PreviewTag=function(e){var{text:a="Preview",exitUrl:n}=e;return(0,t.useEffect)(()=>{var handleBeforeUnload=()=>{navigator.sendBeacon("/api/preview?action=clear")};return window.addEventListener("beforeunload",handleBeforeUnload),()=>{window.removeEventListener("beforeunload",handleBeforeUnload)}},[]),(0,s.jsx)(o.Z,{className:"".concat(c().section," section-preview-tag"),children:(0,s.jsx)(r.Z,{"data-fs-preview-tag":!0,testId:"fs-preview-tag",variant:"danger",label:a,iconButtonLabel:"Exit preview",onClose:()=>{var e=n||window.location.pathname+window.location.search;window.location.href="/api/preview?action=clear&redirect=".concat(encodeURIComponent(e))}})})}},7561:function(e){e.exports={section:"section_section__xOrQo"}},1599:function(e,a,n){"use strict";var t=n(4194),r=n(276),o=n(2614);let i=(0,t.forwardRef)(function({testId:e="fs-tag",label:a,icon:n,iconButtonLabel:i,onClose:c,...s},l){return t.createElement(r.Z,{ref:l,"data-fs-tag":!0,size:"big","data-testid":e,...s},t.createElement("span",{"data-fs-tag-label":!0},a),t.createElement("button",{"data-fs-tag-icon-button":!0,"aria-label":i||"remove",onClick:c},n||t.createElement(o.Z,{name:"X"})))});a.Z=i}}]);