import{b as L}from"./chunk-QG2WC3H3.js";import{a as A}from"./chunk-XXO64O37.js";import{a as F}from"./chunk-KMX5PVQZ.js";import{a as k}from"./chunk-3CODJNWE.js";import{z as j}from"./chunk-HJB5ICMZ.js";import{c as E,d as h,g as I,h as b,j as D}from"./chunk-GDIYNKGM.js";import"./chunk-L4FY67IO.js";import{V as B}from"./chunk-7WODUV7D.js";import"./chunk-KHAMQZND.js";import"./chunk-D3YCQTGW.js";import"./chunk-OBT56KUD.js";import{m as w}from"./chunk-NMCXU7N6.js";import{B as y,Ba as T,Bc as o,Dc as p,Jc as V,Nb as v,Rb as M,Uc as S,Vc as C,Yb as x,bc as c,cc as s,dc as _,ha as u,mc as N,oc as f,p as d,sb as m,tb as g}from"./chunk-IYD54RT7.js";import"./chunk-RVFOIZLJ.js";function O(e,n){if(e&1&&o(0),e&2){let t=f();p(" ",t.navInfo.currentValue.name," ")}}function R(e,n){if(e&1&&o(0),e&2){let t=f();p(" ",t.navInfo.currentValue," ")}}function U(e,n){if(e&1&&o(0),e&2){let t=f();p(" ",t.navInfo.previousValue.name," ")}}function q(e,n){if(e&1&&o(0),e&2){let t=f();p(" ",t.navInfo.previousValue," ")}}function G(e,n){if(e&1&&(c(0,"h1",1),o(1),s(),c(2,"div")(3,"mat-label"),o(4,"Current value: "),v(5,O,1,1)(6,R,1,1),s(),_(7,"br"),c(8,"mat-label"),o(9,"Previous value: "),v(10,U,1,1)(11,q,1,1),s(),_(12,"br"),c(13,"mat-label"),o(14),s(),_(15,"br"),c(16,"mat-label"),o(17),s()()),e&2){let t=n,i=f();m(),p("Diff Report for ",t.navInfo.field,""),m(4),x(5,i.isApplic(t.navInfo.currentValue)?5:6),m(5),x(10,i.isApplic(t.navInfo.previousValue)?10:11),m(4),p("User: ",(t.transaction==null||t.transaction.author==null?null:t.transaction.author.name)||"",""),m(3),p("Time of Change: ",(t.transaction==null?null:t.transaction.timeStamp)||"","")}}var H=(()=>{let n=class n{constructor(i,a){this.transactionService=i,this.sideNavService=a,this.contents=this.sideNavService.rightSideNavContent.pipe(u(r=>d(r).pipe(u(l=>y(()=>l.transaction?.id!==void 0&&l.transaction.id!=="-1",this.transactionService.getTransaction(l?.transaction?.id||"-1"),d(void 0)).pipe(u(P=>d({navInfo:l,transaction:P}))))))),this.opened=this.sideNavService.rightSideNavOpened}isApplic(i){return typeof i=="object"&&i?.name!==void 0}viewDiff(i,a,r){this.sideNavService.rightSideNav={opened:i,field:r,currentValue:a}}};n.\u0275fac=function(a){return new(a||n)(g(L),g(A))},n.\u0275cmp=T({type:n,selectors:[["osee-single-diff"]],standalone:!0,features:[V],decls:7,vars:8,consts:[["mat-icon-button","",3,"click"],["matLine",""]],template:function(a,r){if(a&1&&(c(0,"button",0),S(1,"async"),N("click",function(){return r.viewDiff(!1,"","")}),c(2,"mat-icon"),o(3,"arrow_forward"),s()(),v(4,G,18,5),S(5,"async"),S(6,"async")),a&2){let l;M("@expandButton",C(1,2,r.opened)?"open":"closed"),m(4),x(4,(l=C(5,4,r.contents)!==void 0&&C(6,6,r.contents))?4:-1,l)}},dependencies:[j,w,F,B,k],encapsulation:2,data:{animation:[E("expandButton",[b("closed",I({transform:"rotate(180deg)"})),b("open",I({transform:"rotate(0deg)"})),D("open => closed",h("500ms cubic-bezier(0.4, 0.0, 0.2, 1)")),D("closed => open",h("500ms cubic-bezier(0.4, 0.0, 0.2, 1)"))])]}});let e=n;return e})(),z=H;export{H as SingleDiffComponent,z as default};
