(this.webpackJsonpstreamlit_component_template=this.webpackJsonpstreamlit_component_template||[]).push([[0],{14:function(e,t,a){e.exports=a(51)},21:function(e,t,a){},22:function(e,t,a){},51:function(e,t,a){"use strict";a.r(t);var n=a(2),c=a.n(n),s=a(12),i=a.n(s),l=a(0),o=a(1),b=a(4),u=(a(21),a(22),a(3));var r=Object(b.b)((function(e){var t=e.args,a=t.tabTitle,s=t.limitTabs,i=t.numOfTabs,r=t.addIcon,m=t.styles||{},d=Object(n.useState)(a),v=Object(o.a)(d,2),O=v[0],j=v[1],f=Object(n.useState)({activeTabId:null}),p=Object(o.a)(f,2),y=p[0],E=p[1],g=Object(n.useState)({index:0,clicked:!1}),T=Object(o.a)(g,2),x=T[0],I=T[1],N=Object(n.useState)({status:s,numOfTabs:i}),k=Object(o.a)(N,2),C=k[0],h=(k[1],Object(n.useState)({index:0,status:!1})),S=Object(o.a)(h,2),w=S[0],R=S[1],_=function(e){return w.index===e&&!0===w.status?"fade-in 0.3s ease":"fade-out 0.3s ease"};return c.a.createElement("div",Object.assign({className:"dynamic-tabs"},Object(u.style)(m["dynamic-tabs"])),c.a.createElement("ul",Object.assign({className:"all-tabs"},Object(u.style)(m["all-tabs"])),O.map((function(e,t){return c.a.createElement("span",{className:"tab-container",onMouseEnter:function(){return function(e){R({index:e,status:!0})}(t)},onMouseLeave:function(){return function(e){R({index:e,status:!1})}(t)}},c.a.createElement("span",Object.assign({key:t},Object(u.style)(m["individual-tab-container"]),Object(u.style)(m["tab-selected"]),{className:(a=t,a===y.activeTabId?"individual-tab-container tab-selected":"individual-tab-container"),onClick:function(){return function(e){E({activeTabId:e});var t=O[e];b.a.setComponentValue(t),b.a.setComponentReady()}(t)}}),c.a.createElement("li",null,c.a.createElement("span",Object.assign({},Object(u.style)(m["title-close-save-button-container"]),{className:"title-close-save-button-container"}),c.a.createElement("input",Object.assign({},Object(u.style)(m["title-of-tab"]),{className:"title-of-tab",name:"title",type:"text",required:!0,placeholder:"Rename tab here",size:20,maxLength:20,value:e.title,onClick:function(){return function(e){I({index:e,clicked:!0})}(t)},onChange:function(e){return function(e,t){var a=e.target,n=a.name,c=a.value,s=Object(l.a)(O);s[t][n]=c,j(s)}(e,t)}}))))),x.index===t&&!0===x.clicked&&c.a.createElement("div",Object.assign({},Object(u.style)(m["save-button-container"]),{className:"save-button-container",style:{animation:"save-in 0.3s ease-in-out"}}),c.a.createElement("button",{id:"save",onClick:function(){return function(e){var t=O[e];b.a.setComponentValue(t),b.a.setComponentReady(),I({index:e,clicked:!1})}(t)}},"save")),w.index===t&&!0===w.status&&O.length>1&&c.a.createElement("div",Object.assign({},Object(u.style)(m["close-btn-container"]),{style:{animation:_(t)},className:"close-btn-container"}),c.a.createElement("button",{type:"button",className:"close-btn",onClick:function(){return function(e){var t=Object(l.a)(O);t.splice(e,1),j(t);var a=null;e<y.activeTabId?a=y.activeTabId-1:e>y.activeTabId?a=y.activeTabId:0!==e?a=y.activeTabId-1:0===e&&(a=e),E({activeTabId:a});var n=t[a];b.a.setComponentValue(n),b.a.setComponentReady()}(t)}},c.a.createElement("div",{className:"close-btn-txt"},"\xd7"))," "));var a}))),(!1===C.status||O.length!==C.numOfTabs)&&c.a.createElement("span",Object.assign({},Object(u.style)(m["new-tab-btn-container"]),{className:"new-tab-btn-container"}),c.a.createElement("button",{type:"button",className:"new-tab-btn",onClick:function(){j([].concat(Object(l.a)(O),[{title:""}]));var e=0===O.length?null:y.activeTabId;E({activeTabId:e});var t=null===e?0:O;console.log(t)}},c.a.createElement("i",{className:"material-icons",id:"add-btn"},r))))}));i.a.render(c.a.createElement(c.a.StrictMode,null,c.a.createElement(r,null)),document.getElementById("root"))}},[[14,1,2]]]);
//# sourceMappingURL=main.01078135.chunk.js.map