import{j as e}from"./iframe-B8FSoBNY.js";import{T as i,t}from"./toaster-d9nN0H7K.js";import{S as l}from"./stack-CN4X31TA.js";import{T as p}from"./index-cFwdnc0b.js";import{H as d}from"./h-stack-DWHd8f97.js";import{B as n}from"./button-C7it2n8t.js";import{B as m}from"./index-B0y2_lLF.js";import"./preload-helper-PPVm8Dsz.js";import"./compiler-runtime-BXE7OOXE.js";import"./factory-BR3bc_RM.js";import"./normalize-props-D7NI5JRu.js";import"./index-DaXC_qY_.js";import"./index-DpB4ozcR.js";import"./portal-CZHfPTRw.js";import"./create-slot-recipe-context-DAhDE6G_.js";import"./factory-DAJZwK4o.js";import"./create-recipe-context-BU56IzEo.js";import"./icons-WRA1cA-W.js";import"./dismissable-layer-Cc5dFRd8.js";import"./tabbable-DHAf8oAu.js";import"./overflow-CkG1DOya.js";import"./spinner-ZYH_gvW-.js";import"./index-CXwl6T4k.js";const M={title:"Components/Toaster",component:i,decorators:[o=>e.jsx(m,{minH:"320px",padding:"sm",background:"bg",children:e.jsx(o,{})})]},r={render:()=>{const o=()=>{t.create({type:"success",title:"Pipeline saved",description:"The latest version is ready to run."})},a=()=>{t.create({type:"warning",title:"Missing source files",description:"Add at least one file before starting the job."})},s=()=>{t.create({type:"error",title:"Upload failed",description:"We could not reach the storage bucket."})},c=()=>{t.create({type:"loading",title:"Preparing export",description:"Generating the bundle for this pipeline."})};return e.jsxs(l,{gap:"md",children:[e.jsx(p,{textStyle:"paragraph/S/regular",color:"fg.muted",children:"Trigger a toast to preview styling and placement."}),e.jsxs(d,{gap:"sm",flexWrap:"wrap",children:[e.jsx(n,{size:"sm",onClick:o,children:"Success"}),e.jsx(n,{size:"sm",variant:"outline",onClick:a,children:"Warning"}),e.jsx(n,{size:"sm",variant:"outline",colorPalette:"red",onClick:s,children:"Error"}),e.jsx(n,{size:"sm",variant:"ghost",onClick:c,children:"Loading"})]}),e.jsx(i,{})]})}};r.parameters={...r.parameters,docs:{...r.parameters?.docs,source:{originalSource:`{
  render: () => {
    const handleSuccess = () => {
      toaster.create({
        type: "success",
        title: "Pipeline saved",
        description: "The latest version is ready to run."
      });
    };
    const handleWarning = () => {
      toaster.create({
        type: "warning",
        title: "Missing source files",
        description: "Add at least one file before starting the job."
      });
    };
    const handleError = () => {
      toaster.create({
        type: "error",
        title: "Upload failed",
        description: "We could not reach the storage bucket."
      });
    };
    const handleLoading = () => {
      toaster.create({
        type: "loading",
        title: "Preparing export",
        description: "Generating the bundle for this pipeline."
      });
    };
    return <Stack gap="md">
        <Text textStyle="paragraph/S/regular" color="fg.muted">
          Trigger a toast to preview styling and placement.
        </Text>
        <HStack gap="sm" flexWrap="wrap">
          <Button size="sm" onClick={handleSuccess}>
            Success
          </Button>
          <Button size="sm" variant="outline" onClick={handleWarning}>
            Warning
          </Button>
          <Button size="sm" variant="outline" colorPalette="red" onClick={handleError}>
            Error
          </Button>
          <Button size="sm" variant="ghost" onClick={handleLoading}>
            Loading
          </Button>
        </HStack>
        <Toaster />
      </Stack>;
  }
}`,...r.parameters?.docs?.source}}};const U=["Variants"];export{r as Variants,U as __namedExportsOrder,M as default};
