import{j as l}from"./iframe-B8FSoBNY.js";import{c as S}from"./compiler-runtime-BXE7OOXE.js";import{S as d}from"./index-CXwl6T4k.js";const R=h=>{const e=S.c(17),{fileName:s,additions:k,deletions:q,label:u,variant:x,size:b,onClick:o,onClickFileLink:t}=h,y=x===void 0?"outline":x,T=(b===void 0?"default":b)==="small",c=y==="outline"?"1px solid":"none",m=y==="outline"?T?"3xs":"2xs":"0",p=T?"label/S/regular":void 0,f=o?"pointer":"default";let n;e[0]!==s||e[1]!==t?(n=s&&l.jsx(d,{display:"inline-block",maxW:"24ch",truncate:!0,mr:"xs",title:s,onClick:E=>{E.stopPropagation(),t?.()},cursor:t?"pointer":"default",_hover:{textDecoration:t?"underline":"none",color:t?"fg.blue-dark":"fg.muted"},children:s}),e[0]=s,e[1]=t,e[2]=n):n=e[2];const g=`+${k}`;let i;e[3]!==g?(i=l.jsx(d,{color:"fg.success",children:g}),e[3]=g,e[4]=i):i=e[4];const v=`-${q}`;let r;e[5]!==v?(r=l.jsx(d,{color:"fg.error",children:v}),e[5]=v,e[6]=r):r=e[6];let a;return e[7]!==u||e[8]!==o||e[9]!==r||e[10]!==c||e[11]!==m||e[12]!==p||e[13]!==f||e[14]!==n||e[15]!==i?(a=l.jsxs(d,{display:"inline-flex",alignItems:"center",gap:"2xs",border:c,borderColor:"border.muted",color:"fg.muted",paddingX:m,paddingY:"1px",borderRadius:"xs",textStyle:p,cursor:f,onClick:o,children:[u,n,i,r]}),e[7]=u,e[8]=o,e[9]=r,e[10]=c,e[11]=m,e[12]=p,e[13]=f,e[14]=n,e[15]=i,e[16]=a):a=e[16],a};R.__docgenInfo={description:"",methods:[],displayName:"DiffBubble",props:{fileName:{required:!1,tsType:{name:"string"},description:""},additions:{required:!0,tsType:{name:"number"},description:""},deletions:{required:!0,tsType:{name:"number"},description:""},label:{required:!1,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},variant:{required:!1,tsType:{name:"union",raw:'"outline" | "ghost"',elements:[{name:"literal",value:'"outline"'},{name:"literal",value:'"ghost"'}]},description:""},size:{required:!1,tsType:{name:"union",raw:'"default" | "small"',elements:[{name:"literal",value:'"default"'},{name:"literal",value:'"small"'}]},description:""},onClick:{required:!1,tsType:{name:"signature",type:"function",raw:"(event: MouseEvent<HTMLSpanElement>) => void",signature:{arguments:[{type:{name:"MouseEvent",elements:[{name:"HTMLSpanElement"}],raw:"MouseEvent<HTMLSpanElement>"},name:"event"}],return:{name:"void"}}},description:""},onClickFileLink:{required:!1,tsType:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}}},description:""}},composes:["Omit"]};export{R as D};
