(window.webpackJsonp=window.webpackJsonp||[]).push([[12],{gMlY:function(t,n,e){"use strict";e.r(n),e.d(n,"ConsolePageModule",(function(){return x}));var c=e("ofXK"),o=e("tyNb"),r=e("3Pt+"),i=e("8MG2"),b=e("fXoL"),s=e("ws30"),l=e("rGdz"),a=e("+3VT"),u=e("OcyY"),p=e("SS/w"),f=e("MffP"),h=e("52BL");function g(t,n){if(1&t&&(b.Pb(0),b.Mb(1,"app-sql-result",13),b.Ob()),2&t){const t=b.bc();b.zb(1),b.hc("result",t.result)}}function d(t,n){1&t&&(b.Rb(0,"p",14),b.Rb(1,"i"),b.Dc(2,"run a SQL command first"),b.Qb(),b.Qb())}function m(t,n){1&t&&(b.Pb(0),b.Mb(1,"app-history-list"),b.Ob())}const y=function(){return[3,5,10,25]};function Q(t,n){1&t&&(b.Pb(0),b.Mb(1,"app-history-table",15),b.Ob()),2&t&&(b.zb(1),b.hc("pageSize",10)("pageSizeOptions",b.kc(2,y)))}let R=(()=>{class t{constructor(t,n){this.exercise=t,this.history=n,this.historyUseList=!0,this.prefill="SELECT count(*) AS amount FROM metadata"}ngOnInit(){this.clipboardSubscription=this.history.clipboard.subscribe({next:t=>{console.log(t),t&&(this.prefill=t.body.content,t.result&&(this.result=t.result))}})}onExecute(t){this.result=t}ngOnDestroy(){this.clipboardSubscription.unsubscribe()}}return t.\u0275fac=function(n){return new(n||t)(b.Lb(s.a),b.Lb(l.a))},t.\u0275cmp=b.Fb({type:t,selectors:[["app-console-page"]],decls:34,vars:8,consts:[[1,"clr-row","wrap-row"],[1,"clr-col-lg-6","clr-offset-lg-0","clr-col-md-10","clr-offset-md-1",2,"overflow-y","auto"],[3,"sql","enableSafeModeTrigger","result"],[1,"clr-col-lg-6","clr-offset-lg-0","clr-col-md-10","clr-offset-md-1"],["clrTabLink",""],[4,"ngIf","ngIfElse"],["noResult",""],[2,"display","flex","flex-direction","row","justify-content","space-between","margin-bottom","1.2rem"],[1,"btn-group","btn-icon","btn-default"],[1,"btn",3,"disabled","click"],["shape","view-list"],["shape","table"],[4,"ngIf"],[3,"result"],[2,"text-align","center","display","flex","flex-direction","column","justify-content","center","height","90%"],[3,"pageSize","pageSizeOptions"]],template:function(t,n){if(1&t&&(b.Rb(0,"div",0),b.Rb(1,"div",1),b.Rb(2,"h3"),b.Dc(3,"SQL Console"),b.Qb(),b.Rb(4,"app-sql-input",2),b.Zb("result",(function(t){return n.onExecute(t)})),b.Qb(),b.Qb(),b.Rb(5,"div",3),b.Rb(6,"clr-tabs"),b.Rb(7,"clr-tab"),b.Rb(8,"button",4),b.Dc(9,"Results"),b.Qb(),b.Rb(10,"clr-tab-content"),b.Bc(11,g,2,1,"ng-container",5),b.Bc(12,d,3,0,"ng-template",null,6,b.Cc),b.Qb(),b.Qb(),b.Rb(14,"clr-tab"),b.Rb(15,"button",4),b.Dc(16,"QueryHistory"),b.Qb(),b.Rb(17,"clr-tab-content"),b.Rb(18,"clr-tab-content"),b.Rb(19,"h2",7),b.Rb(20,"span"),b.Dc(21,"Query History"),b.Qb(),b.Rb(22,"div",8),b.Rb(23,"button",9),b.Zb("click",(function(){return n.historyUseList=!0})),b.Mb(24,"clr-icon",10),b.Qb(),b.Rb(25,"button",9),b.Zb("click",(function(){return n.historyUseList=!1})),b.Mb(26,"clr-icon",11),b.Qb(),b.Qb(),b.Qb(),b.Bc(27,m,2,0,"ng-container",12),b.Bc(28,Q,2,3,"ng-container",12),b.Qb(),b.Qb(),b.Qb(),b.Rb(29,"clr-tab"),b.Rb(30,"button",4),b.Dc(31,"Database Information"),b.Qb(),b.Rb(32,"clr-tab-content"),b.Mb(33,"app-schema-inspector"),b.Qb(),b.Qb(),b.Qb(),b.Qb(),b.Qb()),2&t){const t=b.nc(13);b.zb(4),b.hc("sql",n.prefill)("enableSafeModeTrigger",!0),b.zb(7),b.hc("ngIf",n.result)("ngIfElse",t),b.zb(12),b.hc("disabled",n.historyUseList),b.zb(2),b.hc("disabled",!n.historyUseList),b.zb(2),b.hc("ngIf",n.historyUseList),b.zb(1),b.hc("ngIf",!n.historyUseList)}},directives:[a.a,i.R,i.ib,i.O,i.Q,i.bb,i.P,c.p,i.x,u.a,p.a,f.a,h.a],styles:["h1[_ngcontent-%COMP%]{margin-bottom:1.2rem}hr[_ngcontent-%COMP%]{margin-top:.6rem;margin-bottom:.6rem}.wrap-row[_ngcontent-%COMP%]{height:calc(100vh - 60px);width:100%;padding:.6rem;margin:0}.wrap-row-page[_ngcontent-%COMP%]{width:100%;max-width:992px;margin:auto}"]}),t})();var w=e("sWoP"),M=e("aPRB"),L=e("hxDo");let x=(()=>{class t{}return t.\u0275mod=b.Jb({type:t}),t.\u0275inj=b.Ib({factory:function(n){return new(n||t)},imports:[[c.c,o.g.forChild([{path:"",component:R,pathMatch:"full"}]),r.g,i.a,w.a,M.a,L.a]]}),t})()}}]);