import{c as s,d as t,b as n,D as a,o as e,E as r,p as i,F as o,l as c,A as l,y as h,G as p,j as u,e as f,f as m,g as d,h as $,i as b,k as y,m as v,P as g,r as k,x as E,z as T,O as j}from"./chunk.82446879.js";import{M as H}from"./chunk.f5a3f321.js";import"./chunk.e8a2e241.js";import{a as w}from"./chunk.4b4ee497.js";import"./chunk.b01e898f.js";import{a as x}from"./chunk.fb378401.js";function M(s){let t,n,a,r,o,l,h,p,k,E,T;return{c(){t=f("section"),n=f("div"),a=f("div"),r=f("h1"),o=m("Title"),l=e(),h=f("h2"),p=m("Subtitle"),this.h()},l(s){t=d(s,"SECTION",{class:!0});var e=$(t);n=d(e,"DIV",{class:!0});var c=$(n);a=d(c,"DIV",{class:!0});var f=$(a);r=d(f,"H1",{class:!0});var m=$(r);o=b(m,"Title"),m.forEach(u),l=i(f),h=d(f,"H2",{class:!0});var y=$(h);p=b(y,"Subtitle"),y.forEach(u),f.forEach(u),c.forEach(u),e.forEach(u),this.h()},h(){y(r,"class","title"),y(h,"class","subtitle"),y(a,"class","container"),y(n,"class","hero-body"),y(t,"class",k="hero "+s[0])},m(s,e){c(s,t,e),v(t,n),v(n,a),v(a,r),v(r,o),v(a,l),v(a,h),v(h,p),T=!0},p(s,n){(!T||1&n&&k!==(k="hero "+s[0]))&&y(t,"class",k)},i(s){T||(j(()=>{E||(E=g(t,H,{},!0)),E.run(1)}),T=!0)},o(s){E||(E=g(t,H,{},!1)),E.run(0),T=!1},d(s){s&&u(t),s&&E&&E.end()}}}function D(s){let t,n,a,r,o,p,g,j,H,w,x,D=s[0]&&M(s);return{c(){t=f("div"),n=f("button"),a=m("Update Hero"),r=e(),o=f("br"),p=e(),g=f("br"),j=e(),D&&D.c(),this.h()},l(s){t=d(s,"DIV",{slot:!0});var e=$(t);n=d(e,"BUTTON",{class:!0});var c=$(n);a=b(c,"Update Hero"),c.forEach(u),r=i(e),o=d(e,"BR",{}),p=i(e),g=d(e,"BR",{}),j=i(e),D&&D.l(e),e.forEach(u),this.h()},h(){y(n,"class","button is-primary"),y(t,"slot","preview")},m(e,i){c(e,t,i),v(t,n),v(n,a),v(t,r),v(t,o),v(t,p),v(t,g),v(t,j),D&&D.m(t,null),H=!0,w||(x=k(n,"click",s[1]),w=!0)},p(s,n){s[0]?D?(D.p(s,n),1&n&&l(D,1)):((D=M(s)).c(),l(D,1),D.m(t,null)):D&&(E(),h(D,1,1,()=>{D=null}),T())},i(s){H||(l(D),H=!0)},o(s){h(D),H=!1},d(s){s&&u(t),D&&D.d(),w=!1,x()}}}function I(s){let t,n;const f=new w({props:{title:"Hero",subtitle:"Hero headers"}}),m=new x({props:{horizontal:!0,code:"<script>\n  import { slide } from 'svelte/transition'\n\n  const types = ['is-primary', 'is-success', 'is-danger', 'is-warning', 'is-info', 'is-link']\n  let type = 'is-primary'\n\n  async function update() {\n    type = ''\n\n    setTimeout(() => {\n      type = types[Math.floor(Math.random() * types.length)];\n    }, 1000)\n  }\n<\/script>\n\n<button class=\"button is-primary\" on:click={update}>Update Hero</button>\n\n<br />\n<br />\n\n{#if type}\n  <section class=\"hero {type}\" transition:slide>\n    <div class=\"hero-body\">\n      <div class=\"container\">\n        <h1 class=\"title\">\n          Title\n        </h1>\n        <h2 class=\"subtitle\">\n          Subtitle\n        </h2>\n      </div>\n    </div>\n  </section>\n{/if}",$$slots:{preview:[D]},$$scope:{ctx:s}}});return{c(){a(f.$$.fragment),t=e(),a(m.$$.fragment)},l(s){r(f.$$.fragment,s),t=i(s),r(m.$$.fragment,s)},m(s,a){o(f,s,a),c(s,t,a),o(m,s,a),n=!0},p(s,[t]){const n={};9&t&&(n.$$scope={dirty:t,ctx:s}),m.$set(n)},i(s){n||(l(f.$$.fragment,s),l(m.$$.fragment,s),n=!0)},o(s){h(f.$$.fragment,s),h(m.$$.fragment,s),n=!1},d(s){p(f,s),s&&u(t),p(m,s)}}}function S(s,t,n){const a=["is-primary","is-success","is-danger","is-warning","is-info","is-link"];let e="is-primary";return[e,async function(){n(0,e=""),setTimeout(()=>{n(0,e=a[Math.floor(Math.random()*a.length)])},1e3)}]}export default class extends s{constructor(s){super(),t(this,s,S,I,n,{})}}
//# sourceMappingURL=hero.7ff2a4ee.js.map
