text: (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-c7728f86"],{"51d9":function(t,e,n){"use strict";n.r(e);var o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("Layout",[n("RandomQuote")],1)},u=[],a=(n("a4d3"),n("e01a"),n("c2a4")),r=n("444f"),s=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("BaseButton",{on:{click:t.getRandomQuoteIndex}},[t._v(" Po-ta-toes! ")]),n("div",{class:t.$style.quoteContainer},[t.currentQuoteIndex>-1?n("div",{class:t.$style.startQuote},[t._v('"')]):t._e(),n("h3",[t._v(" "+t._s(t.getRandomQuote())+" ")]),t.currentQuoteIndex>-1?n("div",{class:t.$style.endQuote},[t._v('"')]):t._e()])],1)},i=[],d=n("bc3a"),c=n.n(d),l={page:{title:"Random Quote"},data:function(){return{quotes:[],currentQuoteIndex:-1}},mounted:function(){this.fetchData()},methods:{fetchData:function(){var t=this;c.a.get("https://the-one-api.dev/v2/quote",{headers:{Authorization:"Bearer uzUMPxE8664bijd0sxRi"}}).then((function(e){t.quotes=e.data.docs}))},getRandomQuoteIndex:function(){var t=this.quotes.length;this.currentQuoteIndex=Math.round(Math.random()*t)},getRandomQuote:function(){var t;if(!this.quotes||this.currentQuoteIndex<0||!this.quotes[this.currentQuoteIndex])return"";var e,n=null===(t=this.quotes[this.currentQuoteIndex])||void 0===t?void 0:t.dialog;return n.length>200?(this.getRandomQuoteIndex(),null===(e=this.quotes[this.currentQuoteIndex])||void 0===e?void 0:e.dialog):n}}},h=l,f=n("7c40"),v=n("2877");function Q(t){this["$style"]=f["default"].locals||f["default"]}var m=Object(v["a"])(h,s,i,!1,Q,null,null),_=m.exports,x={page:{title:"Home",meta:[{name:"description",content:a.description}]},components:{RandomQuote:_,Layout:r["a"]}},p=x,q=Object(v["a"])(p,o,u,!1,null,null,null);e["default"]=q.exports},"7c40":function(t,e,n){"use strict";var o=n("d1ff"),u=n.n(o);n.d(e,"default",(function(){return u.a}))},d1ff:function(t,e,n){t.exports={quoteContainer:"random-quote_quoteContainer_3hlIH",startQuote:"random-quote_startQuote_2ysaH",endQuote:"random-quote_endQuote_1PiuW"}}}]);
  //# sourceMappingURL=chunk-c7728f86-legacy.d12d6304.js.map