import{c as t,d as s,b as n,D as e,o,E as c,p as a,F as r,l as $,A as i,y as p,G as u,j as m,e as f,g as l,h as g,k as d,m as k,f as h,i as y}from"./chunk.82446879.js";import{g as b,r as j}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=h("Default Snackbar")},l(t){s=y(t,"Default Snackbar")},m(t,n){$(t,s,n)},d(t){t&&m(s)}}}function S(t){let s;return{c(){s=h("Success")},l(t){s=y(t,"Success")},m(t,n){$(t,s,n)},d(t){t&&m(s)}}}function D(t){let s;return{c(){s=h("Top Right")},l(t){s=y(t,"Top Right")},m(t,n){$(t,s,n)},d(t){t&&m(s)}}}function T(t){let s;return{c(){s=h("Custom Background")},l(t){s=y(t,"Custom Background")},m(t,n){$(t,s,n)},d(t){t&&m(s)}}}function I(t){let s,n,h,y,j,x;const B=new b({props:{$$slots:{default:[v]},$$scope:{ctx:t}}});B.$on("click",t[2]);const w=new b({props:{type:"is-success",$$slots:{default:[S]},$$scope:{ctx:t}}});w.$on("click",t[3]);const I=new b({props:{type:"is-danger",$$slots:{default:[D]},$$scope:{ctx:t}}});I.$on("click",t[4]);const C=new b({props:{type:"is-primary",$$slots:{default:[T]},$$scope:{ctx:t}}});return C.$on("click",t[5]),{c(){s=f("div"),n=f("div"),e(B.$$.fragment),h=o(),e(w.$$.fragment),y=o(),e(I.$$.fragment),j=o(),e(C.$$.fragment),this.h()},l(t){s=l(t,"DIV",{slot:!0});var e=g(s);n=l(e,"DIV",{class:!0});var o=g(n);c(B.$$.fragment,o),h=a(o),c(w.$$.fragment,o),y=a(o),c(I.$$.fragment,o),j=a(o),c(C.$$.fragment,o),o.forEach(m),e.forEach(m),this.h()},h(){d(n,"class","buttons svelte-nm7qtc"),d(s,"slot","preview")},m(t,e){$(t,s,e),k(s,n),r(B,n,null),k(n,h),r(w,n,null),k(n,y),r(I,n,null),k(n,j),r(C,n,null),x=!0},p(t,s){const n={};64&s&&(n.$$scope={dirty:s,ctx:t}),B.$set(n);const e={};64&s&&(e.$$scope={dirty:s,ctx:t}),w.$set(e);const o={};64&s&&(o.$$scope={dirty:s,ctx:t}),I.$set(o);const c={};64&s&&(c.$$scope={dirty:s,ctx:t}),C.$set(c)},i(t){x||(i(B.$$.fragment,t),i(w.$$.fragment,t),i(I.$$.fragment,t),i(C.$$.fragment,t),x=!0)},o(t){p(B.$$.fragment,t),p(w.$$.fragment,t),p(I.$$.fragment,t),p(C.$$.fragment,t),x=!1},d(t){t&&m(s),u(B),u(w),u(I),u(C)}}}function C(t){let s,n,f;const l=new x({props:{title:"Snackbar",subtitle:"比提示轻量,比吐司重要的提醒框"}}),g=new B({props:{code:"<script>\n  import { Button, Snackbar } from 'svelma-pro'\n\n  function open(props) {\n    Snackbar.create({ message: 'I am a snackbar message', ...props })\n  }\n<\/script>\n\n<div class=\"buttons\">\n  <Button on:click={() => open()}>Default Snackbar</Button>\n  <Button type=\"is-success\" on:click={() => open({ type: 'is-success' })}>Success</Button>\n  <Button type=\"is-danger\" on:click={() => open({ type: 'is-danger', actionText: 'retry', position: 'is-top-right' })}>Top Right</Button>\n  <Button type=\"is-primary\" on:click={() => open({ background: 'has-background-grey-lighter' })}>Custom Background</Button>\n</div>",$$slots:{preview:[I]},$$scope:{ctx:t}}}),d=new w({props:{jsdoc:t[0]}});return{c(){e(l.$$.fragment),s=o(),e(g.$$.fragment),n=o(),e(d.$$.fragment)},l(t){c(l.$$.fragment,t),s=a(t),c(g.$$.fragment,t),n=a(t),c(d.$$.fragment,t)},m(t,e){r(l,t,e),$(t,s,e),r(g,t,e),$(t,n,e),r(d,t,e),f=!0},p(t,[s]){const n={};64&s&&(n.$$scope={dirty:s,ctx:t}),g.$set(n);const e={};1&s&&(e.jsdoc=t[0]),d.$set(e)},i(t){f||(i(l.$$.fragment,t),i(g.$$.fragment,t),i(d.$$.fragment,t),f=!0)},o(t){p(l.$$.fragment,t),p(g.$$.fragment,t),p(d.$$.fragment,t),f=!1},d(t){u(l,t),t&&m(s),u(g,t),t&&m(n),u(d,t)}}}async function E(){const t=await this.fetch("components/snackbar.json");return{jsdoc:await t.json()}}function R(t,s,n){let{jsdoc:e}=s;function o(t){j.create({message:"I am a snackbar message",...t})}return t.$set=(t=>{"jsdoc"in t&&n(0,e=t.jsdoc)}),[e,o,()=>o(),()=>o({type:"is-success"}),()=>o({type:"is-danger",actionText:"retry",position:"is-top-right"}),()=>o({background:"has-background-grey-lighter"})]}export default class extends t{constructor(t){super(),s(this,t,R,C,n,{jsdoc:0})}}export{E as preload};
//# sourceMappingURL=snackbar.912224e2.js.map
