import{r as registerInstance,h,H as Host}from"./index-b7735e0d.js";import{i as injectNotifier}from"./index-94b34cb1.js";import"./state-tunnel-04c0b67a.js";var dvnComponentDemoCss=".sc-dvn-component-demo-h{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:justify;justify-content:space-between;margin:0 calc(2 * var(--spacing-unit));vertical-align:top;position:relative}.sc-dvn-component-demo-h:first-child{margin-left:0}.sc-dvn-component-demo-h:last-child{margin-right:0}.sc-dvn-component-demo-h dvn-highlighted-code.sc-dvn-component-demo{margin-left:calc(4 * var(--spacing-unit));margin-top:0}.sc-dvn-component-demo-h .flex-column.sc-dvn-component-demo dvn-highlighted-code.sc-dvn-component-demo{margin-top:calc(4 * var(--spacing-unit));margin-left:0}";var DvnComponentDemo=function(){function n(n){registerInstance(this,n);this.layout="vertical"}n.prototype.render=function(){return h(Host,null,h("div",{class:{"align-items-start":true,"d-flex":true,"flex-column":this.layout!=="horizontal"}},h("div",{innerHTML:this.domString,class:""}),h("dvn-highlighted-code",{leaned:true,textToCopy:this.domString},this.domString)))};return n}();DvnComponentDemo.style=dvnComponentDemoCss;var dvnHighlightedCodeCss="dvn-highlighted-code{display:inline-block;-webkit-box-sizing:border-box;box-sizing:border-box;margin:calc(4 * var(--spacing-unit));border-radius:var(--corner-radius);background:var(--color-highlighted-code-background);padding:calc(2 * var(--spacing-unit)) calc(4 * var(--spacing-unit));position:relative;max-width:100%;overflow:auto}dvn-highlighted-code.condensed{padding:0}dvn-highlighted-code.condensed pre.prettyprint{margin:8px}dvn-highlighted-code.condensed .controls{position:absolute;right:0;top:0;bottom:0}dvn-highlighted-code pre.prettyprint{background:var(--color-highlighted-code-background)}dvn-highlighted-code.leaned{margin:0}dvn-highlighted-code:hover .controls{opacity:1}dvn-highlighted-code .controls{opacity:0;-webkit-transition:opacity .3s;transition:opacity .3s}dvn-highlighted-code:not(.condensed) .controls dvn-button{position:absolute;bottom:calc(1 * var(--spacing-unit));right:calc(1 * var(--spacing-unit))}";var copyToClipboard=function(n){var e=document.createElement("textarea");e.value=n;document.body.appendChild(e);e.select();document.execCommand("copy");document.body.removeChild(e)};var DvnHighlightedCode=function(){function n(n){registerInstance(this,n);this.leaned=false;this.condensed=false}n.prototype.componentDidLoad=function(){setTimeout((function(){(PR||{}).prettyPrint()}),100)};n.prototype.render=function(){var n=this;return h(Host,{class:{leaned:this.leaned,condensed:this.condensed}},h("pre",{class:"prettyprint"},h("slot",null)),this.textToCopy&&h("div",{class:"controls"},h("dvn-icon-button",{iconName:"uil uil-copy",leaned:true,view:this.condensed?"solid":"flat",shape:this.condensed?"square":"rounded",tint:"secondary",onClick:function(){copyToClipboard(n.textToCopy);n.notifier.congratulate("Copied to clipboard!")}})))};return n}();injectNotifier(DvnHighlightedCode);DvnHighlightedCode.style=dvnHighlightedCodeCss;export{DvnComponentDemo as dvn_component_demo,DvnHighlightedCode as dvn_highlighted_code};