import{c as t,d as s,b as a,D as e,o as n,E as o,p as c,F as r,l as $,A as i,y as l,G as m,j as f,e as p,g as u,h as g,k as d,m as h,f as v,i as j,S as k,ab as x,ac as b}from"./chunk.82446879.js";import{g as w,D as y}from"./chunk.f5a3f321.js";import"./chunk.e8a2e241.js";import{a as M}from"./chunk.4b4ee497.js";import"./chunk.b01e898f.js";import{a as T}from"./chunk.fb378401.js";import{a as E}from"./chunk.94a6e723.js";function B(t){let s;return{c(){s=v("Toggle")},l(t){s=j(t,"Toggle")},m(t,a){$(t,s,a)},d(t){t&&f(s)}}}function D(t){let s,a,e;return{c(){s=p("p"),a=p("img"),this.h()},l(t){s=u(t,"P",{class:!0});var e=g(s);a=u(e,"IMG",{alt:!0,src:!0}),e.forEach(f),this.h()},h(){d(a,"alt","Test image"),a.src!==(e="https://via.placeholder.com/1280x920")&&d(a,"src","https://via.placeholder.com/1280x920"),d(s,"class","image is-4by3")},m(t,e){$(t,s,e),h(s,a)},d(t){t&&f(s)}}}function G(t){let s,a,v,j;const M=new w({props:{class:"block",$$slots:{default:[B]},$$scope:{ctx:t}}});function T(s){t[3].call(null,s)}M.$on("click",t[2]);let E={$$slots:{default:[D]},$$scope:{ctx:t}};void 0!==t[1]&&(E.active=t[1]);const G=new y({props:E});return k.push(()=>x(G,"active",T)),{c(){s=p("div"),e(M.$$.fragment),a=n(),e(G.$$.fragment),this.h()},l(t){s=u(t,"DIV",{slot:!0});var e=g(s);o(M.$$.fragment,e),a=c(e),o(G.$$.fragment,e),e.forEach(f),this.h()},h(){d(s,"slot","preview")},m(t,e){$(t,s,e),r(M,s,null),h(s,a),r(G,s,null),j=!0},p(t,s){const a={};16&s&&(a.$$scope={dirty:s,ctx:t}),M.$set(a);const e={};16&s&&(e.$$scope={dirty:s,ctx:t}),!v&&2&s&&(v=!0,e.active=t[1],b(()=>v=!1)),G.$set(e)},i(t){j||(i(M.$$.fragment,t),i(G.$$.fragment,t),j=!0)},o(t){l(M.$$.fragment,t),l(G.$$.fragment,t),j=!1},d(t){t&&f(s),m(M),m(G)}}}function I(t){let s,a,p;const u=new M({props:{title:"Modal",subtitle:"模态框"}}),g=new T({props:{code:'<script>\n  import { Button, Modal } from \'svelma-pro\'\n  \n  let active = false\n<\/script>\n\n<Button class="block" on:click={() => active = !active}>Toggle</Button>\n<Modal bind:active={active}>\n  <p class="image is-4by3">\n    <img alt="Test image" src="https://via.placeholder.com/1280x920"/>\n  </p>\n</Modal>',$$slots:{preview:[G]},$$scope:{ctx:t}}}),d=new E({props:{jsdoc:t[0],showEvent:"true"}});return{c(){e(u.$$.fragment),s=n(),e(g.$$.fragment),a=n(),e(d.$$.fragment)},l(t){o(u.$$.fragment,t),s=c(t),o(g.$$.fragment,t),a=c(t),o(d.$$.fragment,t)},m(t,e){r(u,t,e),$(t,s,e),r(g,t,e),$(t,a,e),r(d,t,e),p=!0},p(t,[s]){const a={};18&s&&(a.$$scope={dirty:s,ctx:t}),g.$set(a);const e={};1&s&&(e.jsdoc=t[0]),d.$set(e)},i(t){p||(i(u.$$.fragment,t),i(g.$$.fragment,t),i(d.$$.fragment,t),p=!0)},o(t){l(u.$$.fragment,t),l(g.$$.fragment,t),l(d.$$.fragment,t),p=!1},d(t){m(u,t),t&&f(s),m(g,t),t&&f(a),m(d,t)}}}async function A(){const t=await this.fetch("components/modal.json");return{jsdoc:await t.json()}}function F(t,s,a){let{jsdoc:e}=s,n=!1;return t.$set=(t=>{"jsdoc"in t&&a(0,e=t.jsdoc)}),[e,n,()=>a(1,n=!n),function(t){a(1,n=t)}]}export default class extends t{constructor(t){super(),s(this,t,F,I,a,{jsdoc:0})}}export{A as preload};
//# sourceMappingURL=modal.42c55509.js.map
