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