"use strict";(self.webpackChunk_infuseai_piperider_ui=self.webpackChunk_infuseai_piperider_ui||[]).push([[984],{7984:function(e,n,t){t.r(n),t.d(n,{default:function(){return P}});var a=t(1431),i=t(7615),r=t(2753),l=t(1756),s=t(2847),d=t(2471),o=t(7708),c=t(7437),u=t(962),m=t(4641),p=t(3512),x=t(3214),j=t(2282),h=t(4236),g=t(2175),f=t(7932),b=t(5887),v=["added","deleted","changed"];function C(e){var n=e.added,t=void 0===n?0:n,a=e.deleted,r=void 0===a?0:a,l=e.changed,s=void 0===l?0:l,d=(0,f.Z)(e,v);return(0,b.jsxs)(i.kC,(0,g.Z)((0,g.Z)({gap:2},d),{},{children:["( Added:",(0,b.jsx)(i.xv,{as:"span",fontWeight:700,children:t}),"Deleted:",(0,b.jsx)(i.xv,{as:"span",fontWeight:700,children:r}),"Changed:",(0,b.jsx)(i.xv,{as:"span",fontWeight:700,children:s}),")"]}))}var D=t(421),w=t(3015),S=t(1055),y=t(6674),k=t(3851);function P(e){var n,t=e.data,g=e.columnName,f=e.tableName;(0,S.jr)("Comparison Report: Table Column Details"),(0,S.Lp)({eventName:y.mk.PAGE_VIEW,eventProperties:{type:y.bB,page:"column-details-page"}});var v=t.base.tables,P=t.input.tables,E=(0,l.useState)(0),R=(0,a.Z)(E,2),W=R[0],_=R[1],N=0===g.length;(0,w.n)((function(e){return e.setReportRawData}))({base:t.base,input:t.input});var Z=w.n.getState(),A=Z.tableColumnsOnly,I=void 0===A?[]:A,M=Z.rawData,O=I.find((function(e){return(0,a.Z)(e,1)[0]===f}));if(!f||!v||!P||!O)return(0,b.jsx)(s.o,{isSingleReport:!1,children:(0,b.jsx)(p.J,{text:"No profile data found for table name: ".concat(f)})});var B=(0,a.Z)(O,3),G=B[1],Q=G.base,z=G.target,K=B[2],V=v[f],J=P[f],L=(null===V||void 0===V?void 0:V.columns)||{},$=(null===J||void 0===J?void 0:J.columns)||{},q=L[g],F=$[g],H=F||q,U=(q||{}).type,X=(F||{}).type,Y=(0,x.MM)(H),ee=Y.backgroundColor,ne=Y.icon;return(0,b.jsx)(s.o,{isSingleReport:!1,children:(0,b.jsx)(k.$,{initAsExpandedTables:!0,rawData:M,tableColEntries:I,tableName:f,columnName:g,children:N?(0,b.jsxs)(i.P4,{children:[(0,b.jsx)(D.Q,{title:f,subtitle:"Table",mb:5,infoTip:null===(n=J||V)||void 0===n?void 0:n.description}),(0,b.jsxs)(r.mQ,{defaultIndex:0,children:[(0,b.jsxs)(r.td,{children:[(0,b.jsx)(r.OK,{children:"Overview"}),(0,b.jsx)(r.OK,{children:"Schema"})]}),(0,b.jsxs)(r.nP,{children:[(0,b.jsxs)(r.x4,{children:[(0,b.jsx)(T,{}),(0,b.jsxs)(i.rj,{templateColumns:"1fr 1px 1fr",gap:3,children:[(0,b.jsx)(j.m,{tableDatum:V}),(0,b.jsx)(i.iz,{orientation:"vertical"}),(0,b.jsx)(j.m,{tableDatum:J})]})]}),(0,b.jsxs)(r.x4,{children:[(0,b.jsx)(i.kC,{pb:3,children:(0,b.jsx)(C,{fontWeight:"semibold",color:"gray.600",added:K.added,deleted:K.deleted,changed:K.changed})}),(0,b.jsx)(i.rj,{templateColumns:"1fr",gap:3,height:"100%",children:(0,b.jsx)(h.r,{baseTableEntryDatum:Q,targetTableEntryDatum:z})})]})]})]})]}):(0,b.jsxs)(i.rj,{templateColumns:"1fr 1fr",width:"100%",gap:12,pr:9,children:[(0,b.jsxs)(i.P4,{colSpan:2,rowSpan:2,children:[(0,b.jsx)(D.Q,{title:g,subtitle:null===H||void 0===H?void 0:H.schema_type,infoTip:(null===F||void 0===F?void 0:F.description)||(null===q||void 0===q?void 0:q.description),mb:5,borderBottom:c.dx,icon:ne,iconColor:ee}),(0,b.jsx)(T,{})]}),(0,b.jsx)(i.P4,{colSpan:2,bg:"gray.50",children:(0,b.jsxs)(i.rj,{templateColumns:"1fr 1fr",gap:8,minWidth:0,children:[(0,b.jsx)(d.t,{columnDatum:q}),(0,b.jsx)(d.t,{columnDatum:F})]})}),((0,x.jl)(U)||(0,x.jl)(X))&&(0,b.jsx)(i.P4,{colSpan:2,gridRow:"span 1",bg:"gray.50",children:(0,b.jsxs)(i.rj,{templateColumns:"1fr 1fr",gap:8,children:[(0,b.jsx)(u.E,{columnDatum:q}),(0,b.jsx)(u.E,{columnDatum:F})]})}),((0,x.hG)(U)||(0,x.hG)(X))&&(0,b.jsx)(i.P4,{colSpan:2,gridRow:"span 1",bg:"gray.50",children:(0,b.jsxs)(i.rj,{templateColumns:"1fr 1fr",gap:8,children:[(0,b.jsx)(m.M,{columnDatum:q}),(0,b.jsx)(m.M,{columnDatum:F})]})}),(0,b.jsx)(i.P4,{colSpan:2,gridRow:"span 1",minWidth:0,mt:5,bg:"gray.50",children:(0,b.jsx)(o.r,{baseColumnDatum:q,targetColumnDatum:F,hasSplitView:!0,hasAnimation:!0,tabIndex:W,onSelectTab:function(e){return _(e)}})})]})})})}function T(){return(0,b.jsx)(i.rj,{templateColumns:"1fr 1fr",mb:2,gap:10,children:["Base","Target"].map((function(e,n){return(0,b.jsx)(i.kC,{alignItems:"center",w:"100%",children:(0,b.jsx)(i.xv,{fontWeight:"semibold",fontSize:"2xl",color:"gray.400",w:"100%",children:e})},n)}))})}}}]);
//# sourceMappingURL=984.eb87ba96.chunk.js.map