import{c as t,d as s,b as n,D as o,o as e,E as c,p as a,F as r,l as $,A as i,y as m,G as p,j as u,e as f,g,h as l,k as d,m as h,f as k,i as y}from"./chunk.82446879.js";import{g as j,u as B}from"./chunk.f5a3f321.js";import"./chunk.e8a2e241.js";import{a as x}from"./chunk.4b4ee497.js";import"./chunk.b01e898f.js";import{a as b}from"./chunk.fb378401.js";import{a as w}from"./chunk.94a6e723.js";function v(t){let s;return{c(){s=k("Toast")},l(t){s=y(t,"Toast")},m(t,n){$(t,s,n)},d(t){t&&u(s)}}}function T(t){let s;return{c(){s=k("Success")},l(t){s=y(t,"Success")},m(t,n){$(t,s,n)},d(t){t&&u(s)}}}function I(t){let s;return{c(){s=k("Bottom Right")},l(t){s=y(t,"Bottom Right")},m(t,n){$(t,s,n)},d(t){t&&u(s)}}}function C(t){let s;return{c(){s=k("Custom Background")},l(t){s=y(t,"Custom Background")},m(t,n){$(t,s,n)},d(t){t&&u(s)}}}function D(t){let s,n,k,y,B,x;const b=new j({props:{$$slots:{default:[v]},$$scope:{ctx:t}}});b.$on("click",t[2]);const w=new j({props:{type:"is-success",$$slots:{default:[T]},$$scope:{ctx:t}}});w.$on("click",t[3]);const D=new j({props:{type:"is-danger",$$slots:{default:[I]},$$scope:{ctx:t}}});D.$on("click",t[4]);const E=new j({props:{type:"is-primary",$$slots:{default:[C]},$$scope:{ctx:t}}});return E.$on("click",t[5]),{c(){s=f("div"),n=f("div"),o(b.$$.fragment),k=e(),o(w.$$.fragment),y=e(),o(D.$$.fragment),B=e(),o(E.$$.fragment),this.h()},l(t){s=g(t,"DIV",{slot:!0});var o=l(s);n=g(o,"DIV",{class:!0});var e=l(n);c(b.$$.fragment,e),k=a(e),c(w.$$.fragment,e),y=a(e),c(D.$$.fragment,e),B=a(e),c(E.$$.fragment,e),e.forEach(u),o.forEach(u),this.h()},h(){d(n,"class","buttons svelte-3pxc2m"),d(s,"slot","preview")},m(t,o){$(t,s,o),h(s,n),r(b,n,null),h(n,k),r(w,n,null),h(n,y),r(D,n,null),h(n,B),r(E,n,null),x=!0},p(t,s){const n={};64&s&&(n.$$scope={dirty:s,ctx:t}),b.$set(n);const o={};64&s&&(o.$$scope={dirty:s,ctx:t}),w.$set(o);const e={};64&s&&(e.$$scope={dirty:s,ctx:t}),D.$set(e);const c={};64&s&&(c.$$scope={dirty:s,ctx:t}),E.$set(c)},i(t){x||(i(b.$$.fragment,t),i(w.$$.fragment,t),i(D.$$.fragment,t),i(E.$$.fragment,t),x=!0)},o(t){m(b.$$.fragment,t),m(w.$$.fragment,t),m(D.$$.fragment,t),m(E.$$.fragment,t),x=!1},d(t){t&&u(s),p(b),p(w),p(D),p(E)}}}function E(t){let s,n,f;const g=new x({props:{title:"Toast",subtitle:"吐司"}}),l=new b({props:{code:"<script>\n  import { Button, Toast } from 'svelma-pro'\n\n  function open(type, position) {\n    Toast.create({ message: 'I am a toast', type, position })\n  }\n<\/script>\n\n<Button on:click={() => open()}>Toast</Button>\n<Button type=\"is-success\" on:click={() => open('is-success')}>Success</Button>\n<Button type=\"is-danger\" on:click={() => open('is-danger', 'is-bottom-right')}>Bottom Right</Button>\n<Button type=\"is-primary\" on:click={() => open('is-primary', 'is-top', 'has-background-grey-lighter')}>Custom Background</Button>",$$slots:{preview:[D]},$$scope:{ctx:t}}}),d=new w({props:{jsdoc:t[0]}});return{c(){o(g.$$.fragment),s=e(),o(l.$$.fragment),n=e(),o(d.$$.fragment)},l(t){c(g.$$.fragment,t),s=a(t),c(l.$$.fragment,t),n=a(t),c(d.$$.fragment,t)},m(t,o){r(g,t,o),$(t,s,o),r(l,t,o),$(t,n,o),r(d,t,o),f=!0},p(t,[s]){const n={};64&s&&(n.$$scope={dirty:s,ctx:t}),l.$set(n);const o={};1&s&&(o.jsdoc=t[0]),d.$set(o)},i(t){f||(i(g.$$.fragment,t),i(l.$$.fragment,t),i(d.$$.fragment,t),f=!0)},o(t){m(g.$$.fragment,t),m(l.$$.fragment,t),m(d.$$.fragment,t),f=!1},d(t){p(g,t),t&&u(s),p(l,t),t&&u(n),p(d,t)}}}async function R(){const t=await this.fetch("components/toast.json");return{jsdoc:await t.json()}}function S(t,s,n){let{jsdoc:o}=s;function e(t,s,n){B.create({message:"I am a toast",type:t,position:s,background:n})}return t.$set=(t=>{"jsdoc"in t&&n(0,o=t.jsdoc)}),[o,e,()=>e(),()=>e("is-success"),()=>e("is-danger","is-bottom-right"),()=>e("is-primary","is-top","has-background-grey-lighter")]}export default class extends t{constructor(t){super(),s(this,t,S,E,n,{jsdoc:0})}}export{R as preload};
//# sourceMappingURL=toast.9e2899d7.js.map
