import{r as u,j as o,a$ as d,a as n,cO as i}from"./index-d6499a22.js";const r=s=>s.transformations,x=s=>s.loading.effects.transformations.fetch,h=({isOpen:s,transformation:e,handleToggle:c})=>{const l=u.useMemo(()=>{if(e!=null&&e.sourceCodeContent){const t=JSON.parse(e.sourceCodeContent);return`
        ${t.module_imports!==""?`${t.module_imports}
        
        `:""}${t.transformer_code}
      `}return""},[e]);return o.jsx(d,{size:"7xl",title:`${e==null?void 0:e.name} transformation code preview`,isOpen:!!e&&s,onClose:c,mainButtonProps:{children:"Done",onClick:c},children:o.jsx(n,{flexDirection:"column",height:"100%",flexGrow:1,children:o.jsx(n,{flexGrow:1,children:o.jsx(i,{title:`${e==null?void 0:e.name}.py`,readOnly:!0,copyButton:!0,downloadButton:!0,width:"100%",height:"100%",label:"Transformation snippet (Python)",language:"python",content:l})})})})};export{h as V,r as a,x as s};
