mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-14 18:01:06 +00:00
1 line
1.8 KiB
JavaScript
1 line
1.8 KiB
JavaScript
let t=document.createElement("style");t.innerHTML="",document.head.appendChild(t);import{S as e,i as a,s as n,c as s,j as o,a as r,p as c,m as $,q as i,t as l,b as d,d as u,o as m,h as f,n as p,H as g,T as C,U as h,G as x,g as b,k as y,l as j,r as S}from"./index.c2c9d961.js";import{B as w}from"./Button.37430222.js";import"./Close20.452e634c.js";import{M as B}from"./Modal.ec0cd758.js";function T(t){let e;return{c(){e=f("Create database")},l(t){e=p(t,"Create database")},m(t,a){i(t,e,a)},d(t){t&&m(e)}}}function k(t){let e,a;return{c(){e=b("p"),a=f("Create a new Cloudant database in the US South region.")},l(t){e=y(t,"P",{});var n=j(e);a=p(n,"Create a new Cloudant database in the US South region."),n.forEach(m)},m(t,n){i(t,e,n),S(e,a)},d(t){t&&m(e)}}}function H(t){let e,a,n,f,p;function x(e){t[2].call(null,e)}e=new w({props:{$$slots:{default:[T]},$$scope:{ctx:t}}}),e.$on("click",t[1]);let b={modalHeading:"Create database",primaryButtonText:"Confirm",secondaryButtonText:"Cancel",$$slots:{default:[k]},$$scope:{ctx:t}};return void 0!==t[0]&&(b.open=t[0]),n=new B({props:b}),g.push(()=>C(n,"open",x)),n.$on("click:button--secondary",t[3]),n.$on("open",t[4]),n.$on("close",t[5]),n.$on("submit",t[6]),{c(){s(e.$$.fragment),a=o(),s(n.$$.fragment)},l(t){r(e.$$.fragment,t),a=c(t),r(n.$$.fragment,t)},m(t,s){$(e,t,s),i(t,a,s),$(n,t,s),p=!0},p(t,[a]){const s={};128&a&&(s.$$scope={dirty:a,ctx:t}),e.$set(s);const o={};128&a&&(o.$$scope={dirty:a,ctx:t}),!f&&1&a&&(f=!0,o.open=t[0],h(()=>f=!1)),n.$set(o)},i(t){p||(l(e.$$.fragment,t),l(n.$$.fragment,t),p=!0)},o(t){d(e.$$.fragment,t),d(n.$$.fragment,t),p=!1},d(t){u(e,t),t&&m(a),u(n,t)}}}function M(t,e,a){let n=!1;return[n,()=>a(0,n=!0),function(t){n=t,a(0,n)},()=>a(0,n=!1),function(e){x(t,e)},function(e){x(t,e)},function(e){x(t,e)}]}export default class extends e{constructor(t){super(),a(this,t,M,H,n,{})}}
|