1"use strict";(globalThis.webpackChunkdls_client||=[]).push([[2772],{10357(e,a,l){l.d(a,{A:()=>b});var r=l(77627),s=l(44978),i=l(72018),n=l(9642),d=l(81931),t=l(72052),o=l(65043),c=l(73103),h=l(9255),u=l(90799),m=l(21691),v=l(98595),S=l(75357),x=l(82113),y=l(70579);function b(e){var a,l;let{onUpdateFormData:b,onDisableNext:f,demo:p,promiseToSell:N,installment:g,buyerSellersMapperKey:j,expansionFactorKey:D,landExpansionFactorKey:k,accumilativeKey:w,landOwners:I,selling:L,withApartmentLand:F,buyersDetailsKey:T="buyersDetails",sharesDivisorKey:A="sharesDivisor",landSharesDivisorKey:K="landSharesDivisor",shareAccKey:O="shareAcc",landShareAccKey:C="landShareAcc",sellersLandShareKey:E="sellersLandShare",showLandExpansionKey:M="showLandExpansion",sameBuyerSellerError:V,buyerName:B,buyerNationalId:P,sharesNeedsToBuy:q}=e;const{isTotalShares:J,allShares:R,landRegNo:$,...H}=(0,c.d4)(e=>e.sellingFormDetails),U=I||H.selectedShares,Q=H[j]||[],W=H[M]||!1,_=(0,o.useMemo)(()=>H[T]||[],[H,T]);console.log("landOwners",I,$);const z=H[w]||[],G=(0,c.wA)(),[X,Y]=(0,o.useState)($),[Z,ee]=(0,o.useState)(!1),[ae,le]=(0,o.useState)(!0),[re,se]=(0,o.useState)(null),[ie,ne]=(0,o.useState)(H[A]||1),[de,te]=(0,o.useState)(H[K]||1),[oe,ce]=(0,o.useState)(H[O]||0),[he,ue]=(0,o.useState)(H[C]||0),[me,ve]=(0,o.useState)(H[D]||1),[Se,xe]=(0,o.useState)(H[k]||1),[ye,be]=(0,o.useState)(""),fe=e=>{b({[T]:_,isTotalShares:J,[O]:oe,[A]:ie,[C]:he,[K]:de,...e})},pe=[{label:(0,s.t)("realtySelling.noRelativity"),value:"0"},{label:(0,s.t)("realtySelling.relativityPartner"),value:"1"},{label:(0,s.t)("realtySelling.relativityBranches"),value:"2"}],Ne=(0,r.Wx)({initialValues:{seller:{},buyer:{},refernceShares:"",sellersShares:null===(a=U[0])||void 0===a?void 0:a.shareNo,shareDividend:"",shareDivisor:ie,relativity:"0",referenceLandShares:"",sellersLandShare:"",aqsamFlag:!1,landShareDividend:"",landShareDivisor:de,isShares:!1},validate:e=>{const a={};return e.seller.partyId||(a.seller=(0,s.t)("errors.required")),e.buyer.n
1ationalId||(a.buyer=(0,s.t)("errors.required")),null===re&&Ae(e.seller.partyId,e.buyer.nationalId)&&(a.seller=V||(0,s.t)("errors.buyerSellerExist")),e.shareDividend?je(e.seller.ownShares,e.sellersShares,e.shareDividend,e.shareDivisor)?De(e.seller.partyId,e.seller.ownShares,e.sellersShares,e.shareDividend,e.shareDivisor,"share")&&(a.shareDividend=(0,s.t)("errors.sharesMoreThanSeller")):a.shareDividend=(0,s.t)("errors.shareDividendLargerThanDivisor"):a.shareDividend=(0,s.t)("errors.required"),e.shareDivisor||(a.shareDivisor=(0,s.t)("errors.required")),e.isShares&&(e.landShareDividend?je(e.referenceLandShares,e.sellersLandShare,e.landShareDividend,e.landShareDivisor)?De(e.seller.partyId,e.sellersLandShare,e.referenceLandShares,e.landShareDividend,e.landShareDivisor,"land")&&(a.landShareDividend=(0,s.t)("errors.sharesMoreThanSeller")):a.landShareDividend=(0,s.t)("errors.landShareDividendLargerThanDivisor"):a.landShareDividend=(0,s.t)("errors.required"),e.landShareDivisor||(a.landShareDivisor=(0,s.t)("errors.required"))),a},onSubmit:e=>{const a=Q.reduce((e,a)=>e+ +a.actualPaid,0);e.actualPaid=+e.sharesToBuy/+e.refernceShares*(+e.seller.ownShares-a);const l=[...Q];null!==re?l[re]={...e}:l.push(e),ce(null===re?a=>+a+ +e.shareDividend:a=>+a+ +e.shareDividend-+Q[re].shareDividend),e.isShares&&ue(null===re?a=>+a+ +e.landShareDividend:a=>+a+ +e.landShareDividend-+Q[re].landShareDividend),fe({[j]:l,[D]:me,[k]:Se,[w]:ge(e.seller.partyId,e.shareDividend,e.landShareDividend)}),Q[re]?G((0,S.Te)((0,s.t)("common.edited"))):G((0,S.Te)((0,s.t)("common.saved"))),setTimeout(()=>{G((0,S.Te)(""))},3e3),ee(!1),Ne.resetForm(),se(null)}}),ge=(e,a,l)=>{const r=JSON.parse(JSON.stringify(z)),s=r.findIndex(a=>a.sellerId===e);if(s>=0){const{paidShare:e,landPaidShare:i}=r[s];let n={...r[s]};null!==re?(n.paidShare=+e+ +a-+Q[re].shareDividend,n.landPaidShare=+i+ +l-+Q[re].landShareDividend):(n.paidShare=+e+ +a,n.landPaidShare=+i+ +l),r[s]=n}else r.push({sellerId:e,paidShare:a,landPaidShare:l});return r},je=(e,a,l,r)=>+e/+a>=+l/+r,De=(e,a,l,r,s,i)=>{var n,d;const t=+a/+l,o=+(null===(n=z.find(a=>a.sellerId===e))||void 0===n?void 0:n.paidShare),c=+(null===(d=z.find(a=>a.sellerId===e))||void 0===d?void 0:d.landPaidShare);if(null!==re){if("share"===i){return(+r+o-+Q[re].shareDividend)/+s>t}return(+r+c-+Q[re].landShareDividend)/+s>t}if("share"===i){return(+r+o)/+s>t}return(+r+c)/+s>t},ke=(0,o.useCallback)(()=>1===_.length&&_[0].buyAllProperty,[_]);(0,o.useEffect)(()=>{var e;if(!p&&ke()&&(null===(e=Q[0])||void 0===e||!e.relativity)){const e=U.map(e=>{var a;return{seller:e,buyer:_[0],shareDividend:e.ownShares,shareDivisor:e.shareNo,sellersShares:null===(a=U[0])||void 0===a?void 0:a.shareNo}});fe({[j]:e})}},[ke,U,_]);(0,o.useEffect)(()=>{var e,a;Ne.setFieldValue("shareDivisor",Ne.values.seller.shareNo*me);const l=null===(e=H.landOwners)||void 0===e||null===(a=e.find(e=>{var a;return e.partyId===(null===(a=Ne.values.seller)||void 0===a?void 0:a.partyId)}))||void 0===a?void 0:a.shareNo;Ne.setFieldValue("landShareDivisor",l*Se)},[me,Ne.values.seller,Se,Ne.values.referenceLandShares]);const we=[{label:(0,s.t)("realtySelling.sellerNationalId"),key:"sellerNationalId",body:e=>e.seller.partyId},{label:(0,s.t)("realtySelling.sellerName"),key:"sellerName",body:e=>e.seller.partyName},{label:N?(0,s.t)("OwnershipTransfer.promiseToSell.promisedToSellNationalId"):P||(0,s.t)("realtySelling.buyerNationalId"),key:"buyerNationalId",body:e=>e.buyer.nationalId},{label:N?(0,s.t)("OwnershipTransfer.promiseToSell.promisedToSellName"):B||(0,s.t)("realtySelling.buyerName"),key:"buyerName",body:e=>e.buyer.buyerArabicName},{label:(0,s.t)("realtySelling.sharesRatio"),key:"sharesRatio",body:e=>e.shareDividend+" / "+e.shareDivisor},{label:(0,s.t)("realtySelling.landShares"),key:"landSharesRasio",body:e=>e.landShareDividend+" / "+e.landShareDivisor,hidden:ae},{label:(0,s.t)("realtySelling.relativity"),key:"relativity",body:e=>{const a=pe.find(a=>a.value===e.relativity);return null===a||void 0===a?void 0:a.label}},{label:"",key:"actions",body:(e,a)=>{let{rowIndex:l}=a;return(0,y.jsxs)("div",{className:"d-flex",children:[(0,y.jsx)(i.$,{className:"p-button-rounded bg-transparent outline-none",icon:"pi pi-pencil text-main-color text-sm",style:{border:"none"},onClick:()=>{return se(e=l),Ne.setValues(Q[e]),void ee(!0);var e},disabled:Z}),ke()?null:(0,y.jsx)(i.$,{className:"p-button-rounded bg-transparent outline-none",icon:"pi pi-trash text-danger text-sm",style:{border:"none"},onClick:()=>(e=>{const{seller:a,landShareDividend:l,shareDividend:r}=Q[e],i=JSON.parse(JSON.stringify(z)),n=i.findIndex(e=>e.sellerId===a.partyId);i.splice(n,1),i.push(((e,a,l)=>{let r={...e};return r.paidShare=+e.paidShare-+l,r.landPaidShare=+e.landPaidShare-+a,r})(z.find(e=>e.sellerId===a.partyId),l,r));const d=Q.filter((a,l)=>l!==e);fe({[j]:d,[w]:i}),G((0,S.Te)((0,s.t)("common.deleted"))),setTimeout(()=>{G((0,S.Te)(""))},3e3)})(l)})]})},hidden:p}],Ie=()=>{const e={};return Q.forEach(a=>{e[a.seller.partyId]?e[a.seller.partyId]+=+a.sharesToBuy/+a.refernceShares*+a.seller.ownShares:e[a.seller.partyId]=+a.sharesToBuy/+a.refernceShares*+a.seller.ownShares}),U.filter(a=>Q.length?!e[a.partyId]||e[a.partyId]<+a.ownShares||null!=re&&Q[re].seller.partyId===a.partyId?a:null:a)};(0,o.useEffect)(()=>
1{if(!p){const[e,a]=(0,v.kR)(JSON.parse(JSON.stringify(Q)),JSON.parse(JSON.stringify(U)),JSON.parse(JSON.stringify(_)),R,J);!1===e&&!1===_[0].buyAllProperty?(f(!0),be((0,s.t)(`errors.${a}`))):(be(""),Q.length?f(!1):(f(!0),ve(1)))}},[Q]),(0,o.useEffect)(()=>{if(Q&&Q.length){const e=JSON.parse(JSON.stringify(Q)).map(e=>({...e,seller:U.find(a=>a.partyId===e.seller.partyId)}));fe({[j]:e})}},[j,U]);const Le=(e,a)=>{const{landFlag:l,partyId:r,regNo:s}=e;if("FLAT"===l){if(!X||!a.length)return le(!0),{landShareDividend:"0",landShareDivisor:"0",referenceLandShares:"0",sellersLandShare:"0"};{const e=a.find(e=>e.partyId===r);if(e)return fe({[M]:!0,[E]:e.ownShares}),le(!1),{referenceLandShares:e.shareNo,sellersLandShare:e.ownShares,isShares:!0}}}return{}},Fe=e=>{(/^[1-9]+\d*$/.test(e.target.value)||""===e.target.value)&&Ne.handleChange(e)};(0,o.useEffect)(()=>{X&&(L||F)?(0,x.ae)(X).then(e=>{const a=e.data&&e.data.length?e.data:[],l=a.filter(e=>!!U.find(a=>a.partyId===e.partyId));var r;if(l.length)if(le(!1),p||!ke()||null!==(r=Q[0])&&void 0!==r&&r.relativity)fe({[M]:!0,landOwners:a.filter(e=>!!U.find(a=>a.partyId===e.partyId)),[E]:a[0].ownShares});else{const e=U.map(e=>{var r,s,i;return{seller:e,buyer:_[0],shareDividend:e.ownShares,shareDivisor:e.shareNo,sellersShares:null===(r=U[0])||void 0===r?void 0:r.shareNo,landShareDividend:null===(s=a.find(a=>a.partyId===e.partyId))||void 0===s?void 0:s.ownShares,landShareDivisor:null===(i=a.find(a=>a.partyId===e.partyId))||void 0===i?void 0:i.shareNo,...Le(e,l)}});fe({[M]:!0,landOwners:l,[E]:a[0].ownShares,[j]:e})}else Y("")}).catch(e=>{G((0,S.Qg)((0,s.t)("errors.pleaseChooseLandShares")))}):le(!0)},[L,F,X,U,p,ke,j]);const Te=(e,a)=>{var l;const r=null===(l=U[0])||void 0===l?void 0:l.shareNo,s=Ne.values.referenceLandShares;if(/^[1-9]+\d*$/.test(e.target.value)||""===e.target.value)if("flat"===a){ve(e.target.value);const a=+e.target.value*+r;ne(a),Ne.setFieldValue("shareDivisor",a)}else{xe(e.target.value);const a=+e.target.value*+s;te(a),Ne.setFieldValue("landShareDivisor",a)}},Ae=(e,a)=>{if(Q.length)for(let s=0;s<Q.length;s++){var l,r;if((null===(l=Q[s].seller)||void 0===l?void 0:l.partyId)===e&&(null===(r=Q[s].buyer)||void 0===r?void 0:r.nationalId)===a)return!0}};return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(m.A,{title:q||(0,s.t)("realtySelling.sharesNeedsToBuy"),children:[(0,y.jsx)(d.b,{className:"realty-table fm-kufi-regular",tableClassName:"w-100",value:Q,responsiveLayout:"scroll",emptyMessage:(0,s.t)("common.noResultsFound"),children:null===we||void 0===we?void 0:we.map(e=>(0,y.jsx)(n.V,{field:e.key,header:e.label,body:e.body?e.body:null,hidden:e.hidden},e.key))}),!ke()&&!p&&(Z||!!Q.length)&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(u.A,{children:[(0,y.jsx)(h.A,{title:(0,s.t)("realtySelling.expansionFactor"),required:!0,name:"expansionFactor",keyfilter:"pint",value:me,onChange:e=>Te(e,"flat"),disabled:Q.length||p,maxLength:5,info:(0,s.t)("common.expansionFactorNote")}),(0,y.jsxs)("div",{className:"col-lg-1",children:[(0,y.jsx)("br",{}),(0,y.jsx)("label",{className:"mt-2",children:"x"})]}),(0,y.jsx)(h.A,{title:(0,s.t)("realtySelling.currentTotalShares"),name:"currentTotalShares",value:U[0].shareNo,disabled:!0}),(0,y.jsxs)("div",{className:"col-lg-1",children:[(0,y.jsx)("br",{}),(0,y.jsx)("label",{className:"mt-2",children:"="})]}),(0,y.jsx)(h.A,{title:(0,s.t)("realtySelling.newTotalShares"),name:"newTotalShares",value:U[0].shareNo*me,disabled:!0})]}),W&&(0,y.jsxs)(u.A,{children:[(0,y.jsx)("hr",{className:"mt-3"}),(0,y.jsx)(h.A,{title:(0,s.t)("realtySelling.landExpansionFactor"),required:!0,name:"landExpansionFactor",keyfilter:"pint",value:Se,onChange:e=>Te(e,"land"),disabled:Q.length||p,maxLength:5,info:(0,s.t)("common.expansionFactorNote")}),(0,y.jsxs)("div",{className:"col-lg-1",children:[(0,y.jsx)("br",{}),(0,y.jsx)("label",{className:"mt-2",children:"x"})]}),(0,y.jsx)(h.A,{title:(0,s.t)("realtySelling.currentLandTotalShares"),name:"currentLandTotalShares",value:H[E]||0,disabled:!0}),(0,y.jsxs)("div",{className:"col-lg-1",children:[(0,y.jsx)("br",{}),(0,y.jsx)("label",{className:"mt-2",children:"="})]}),(0,y.jsx)(h.A,{title:(0,s.t)("realtySelling.newLandTotalShares"),name:"newLandTotalShares",value:(H[E]||0)*Se,disabled:!0})]})]}),ye&&(0,y.jsx)("p",{className:"p-error mt-2 mb-0",children:ye})]}),!p&&(0,y.jsxs)(y.Fragment,{children:[!ke()&&!Z&&!!Ie().length&&(!X||!L&&!F||Boolean(null===(l=H.landOwners)||void 0===l?void 0:l.length))&&(0,y.jsx)(i.$,{className:"add-buyer fm-kufi-regular text-sm offset-3",label:(0,s.t)("realtySelling.buyNewShare"),icon:"pi pi-plus",iconPos:"left",onClick:()=>{Ne.resetForm(),Ne.setFieldValue("shareDivisor",ie),Ne.setFieldValue("landSharesDivisor",de),ee(!0)}}),Z&&(0,y.jsx)(m.A,{title:(0,s.t)("\u062a\u0641\u0627\u0635\u064a\u0644 \u0627\u0644\u062d\u0635\u0629"),children:(0,y.jsxs)("form",{className:"shares-form",onSubmit:Ne.handleSubmit,children:[(0,y.jsxs)(u.A,{children:[(0,y.jsx)(h.A,{title:(0,s.t)("realtySelling.sellerName"),required:!0,double:!0,disableFilter:!0,formik:Ne,name:"seller",type:"select",value:Ne.values.seller,onChange:e=>{Ne.handleChange(e),(e=>{const{landFlag:a,partyId:l,regNo:r}=e;if("FLAT"===a)if(X&&H.landOwners.length){const e=H.landOwners.find(e=>e.partyId===l);e&&(Ne.setFieldValue("referenceLandShares",e.shareNo),Ne.setFieldValue("sellersLandShare",e.ownShares),Ne.setFieldValue("isShares",!0),fe({[M]:!0,[E]:e.ownShares}),le(!1))}else Ne.setFieldValue("landShareDividend","0"),Ne.setFieldValue("landShareDivisor","0"),Ne.setFieldValue("referenceLandShares","0"),Ne.setFieldValue("sellersLandShare","0"),le(!0)})(e.value)},options:Ie().map(e=>({label:e.partyName,value:e})),optionLabel:"label",optionValue:"value",disabled:ke()}),(0,y.jsx)(h.A,{title:N?(0,s.t)("OwnershipTransfer.promiseToSell.promisedToSellName"):B||(0,s.t)("realtySelling.buyerName"),required:!0,double:!0,disableFilter:!0,formik:Ne,name:"buyer",type:"select",value:Ne.values.buyer,onCh
1ange:Ne.handleChange,options:_.map(e=>({label:e.buyerArabicName,value:e})),optionLabel:"label",optionValue:"value",disabled:ke()}),(0,y.jsx)(h.A,{title:(0,s.t)("realtySelling.relativity"),required:!0,formik:Ne,name:"relativity",type:"select",value:Ne.values.relativity,onChange:Ne.handleChange,options:pe.map(e=>({label:e.label,value:e.value})),optionLabel:"label",optionValue:"value"})]}),Ne.values.seller.partyId&&!ke()&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(u.A,{children:[(0,y.jsxs)("div",{className:"col-lg-8 col-12 mb-4 form-inputs",children:[(0,y.jsxs)("div",{className:"row",children:[(0,y.jsx)("div",{className:"col-4"}),(0,y.jsx)("div",{className:"col-3",children:(0,y.jsx)("label",{className:"block text-xs fm-kufi-regular text-form-label",children:(0,s.t)("realtySelling.shares")})}),(0,y.jsx)("div",{className:"col-1"}),(0,y.jsx)("div",{className:"col-3",children:(0,y.jsx)("label",{className:"block text-xs fm-kufi-regular text-form-label",children:(0,s.t)("realtySelling.fullshares")})})]}),(0,y.jsxs)("div",{className:"row",children:[(0,y.jsx)("div",{className:"col-4"}),(0,y.jsx)("div",{className:"col-3",children:(0,y.jsx)(t.S,{name:"refernceShares",value:(()=>{if(!Ne.values.seller.partyId)return"";if(!Q.length)return Ne.values.seller.ownShares;let e=Q.reduce((e,a)=>e+ +a.actualPaid,0);return null!=re&&(e=+Ne.values.seller.ownShares-e),Ne.values.seller.ownShares})(),disabled:!0,className:"text-xs fm-kufi-regular bg-disabled-color w-100"})}),(0,y.jsx)("div",{className:"col-1",children:(0,y.jsx)("span",{className:"text-xs fm-kufi-regular text-start",children:(0,s.t)("common.from")})}),(0,y.jsx)("div",{className:"col-3",children:(0,y.jsx)(t.S,{disabled:!0,value:Ne.values.sellersShares,className:"text-xs fm-kufi-regular bg-disable-color bg-disabled-color w-100",name:"sellerShares"})})]})]}),(0,y.jsxs)("div",{className:"col-lg-8 col-12 mb-4 form-inputs",children:[(0,y.jsxs)("div",{className:"row",children:[(0,y.jsx)("div",{className:"col-3",children:(0,y.jsxs)("label",{className:"block text-xs fm-kufi-regular text-form-label",children:[(0,s.t)("realtySelling.sharesToBuy")," ",(0,y.jsx)("span",{className:"text-danger",children:"*"})]})}),(0,y.jsx)("div",{className:"col-1"}),(0,y.jsx)("div",{className:"col-3",children:(0,y.jsx)("label",{className:"block text-xs fm-kufi-regular text-form-label",children:(0,s.t)("realtySelling.sellerShares")}
1)}),(0,y.jsx)("div",{className:"col-1"}),(0,y.jsx)("div",{className:"col-3",children:(0,y.jsx)("label",{className:"block text-xs fm-kufi-regular text-form-label",children:(0,s.t)("realtySelling.fullsharesToBuy")})})]}),(0,y.jsxs)("div",{className:"row",children:[(0,y.jsx)("div",{className:"col-3",children:(0,y.jsx)(t.S,{name:"shareDividend",onChange:Fe,keyfilter:"pint",value:Ne.values.shareDividend,className:"text-xs fm-kufi-regular w-100"})}),(0,y.jsx)("div",{className:"col-1",children:(0,y.jsx)("span",{className:"text-xs fm-kufi-regular text-start",children:(0,s.t)("common.from")})}),(0,y.jsx)("div",{className:"col-3",children:(0,y.jsx)(t.S,{onChange:Fe,value:Ne.values.seller.ownShares*me,className:"text-xs fm-kufi-regular bg-disabled-color w-100",name:"shareDivisor",disabled:!0})}),(0,y.jsx)("div",{className:"col-1",children:(0,y.jsx)("span",{className:"text-xs fm-kufi-regular text-start",children:(0,s.t)("common.from")})}),(0,y.jsx)("div",{className:"col-3",children:(0,y.jsx)(t.S,{onChange:Fe,value:Ne.values.shareDivisor,className:"text-xs fm-kufi-regular bg-disabled-color w-100",name:"shareDivisor",disabled:!0})})]}),(0,v.AH)(Ne,"shareDividend")||(0,v.AH)(Ne,"shareDivisor")]})]}),Ne.values.isShares&&(0,y.jsxs)(u.A,{children:[(0,y.jsxs)("div",{className:"col-lg-8 col-12 mb-4 form-inputs",children:[(0,y.jsxs)("div",{className:"row",children:[(0,y.jsx)("div",{className:"col-4"}),(0,y.jsx)("div",{className:"col-3",children:(0,y.jsx)("label",{className:"block text-xs fm-kufi-regular text-form-label",children:(0,s.t)("realtySelling.landShares")})}),(0,y.jsx)("div",{className:"col-1"}),(0,y.jsx)("div",{className:"col-3",children:(0,y.jsx)("label",{className:"block text-xs fm-kufi-regular text-form-label",children:(0,s.t)("realtySelling.totalLandShares")})})]}),(0,y.jsxs)("div",{className:"row",children:[(0,y.jsx)("div",{className:"col-4"}),(0,y.jsx)("div",{className:"col-3",children:(0,y.jsx)(t.S,{name:"sellersLandShare",value:Ne.values.sellersLandShare,disabled:!0,className:"text-xs fm-kufi-regular bg-disabled-color w-100"})}),(0,y.jsx)("div",{className:"col-1",children:(0,y.jsx)("span",{className:"text-xs fm-kufi-regular",children:(0,s.t)("common.from")})}),(0,y.jsx)("div",{className:"col-3",children:(0,y.jsx)(t.S,{disabled:!0,value:Ne.values.referenceLandShares,className:"text-xs fm-kufi-regular bg-disabled-color w-100",name:"referenceLandShares"})})]})]}),(0,y.jsxs)("div",{className:"col-lg-8 col-12 mb-4 form-inputs",children:[(0,y.jsxs)("div",{className:"row",children:[(0,y.jsx)("div",{className:"col-3",children:(0,y.jsxs)("label",{className:"block text-xs fm-kufi-regular text-form-label",children:[(0,s.t)("realtySelling.landSharesToBuy")," ",(0,y.jsx)("span",{className:"text-danger",children:"*"})]})}),(0,y.jsx)("div",{className:"col-1"}),(0,y.jsx)("div",{className:"col-3",children:(0,y.jsx)("label",{className:"block text-xs fm-kufi-regular text-form-label",children:(0,s.t)("realtySelling.expandedLandShares")})}),(0,y.jsx)("div",{className:"col-1"}),(0,y.jsx)("div",{className:"col-3",children:(0,y.jsx)("label",{className:"block text-xs fm-kufi-regular text-form-label",children:(0,s.t)("realtySelling.expandedTotalLandShares")})})]}),(0,y.jsxs)("div",{className:"row",children:[(0,y.jsx)("div",{className:"col-3",children:(0,y.jsx)(t.S,{name:"landShareDividend",onChange:Fe,value:Ne.values.landShareDividend,className:"text-xs fm-kufi-regular w-100"})}),(0,y.jsx)("div",{className:"col-1",children:(0,y.jsx)("span",{className:"text-xs fm-kufi-regular",children:(0,s.t)("common.from")})}),(0,y.jsx)("div",{className:"col-3",children:(0,y.jsx)(t.S,{onChange:Fe,value:Ne.values.sellersLandShare*Se,className:"text-xs fm-kufi-regular bg-disabled-color w-100",name:"landShareDivisor",disabled:!0})}),(0,y.jsx)("div",{className:"col-1",children:(0,y.jsx)("span",{className:"text-xs fm-kufi-regular",children:(0,s.t)("common.from")})}),(0,y.jsx)("div",{className:"col-3",children:(0,y.jsx)(t.S,{onChange:Fe,value:Ne.values.landShareDivisor,className:"text-xs fm-kufi-regular bg-disabled-color w-100",name:"landShareDivisor",disabled:!0})})]}),(0,v.AH)(Ne,"landShareDividend")||(0,v.AH)(Ne,"landShareDivisor")]})]})]}),(0,y.jsxs)("div",{className:"row justify-content-center my-4 submit-action gap-4",children:[(0,y.jsx)(i.$,{type:"submit",label:(0,s.t)("common.save"),className:"action-btn col-lg-2 col-sm-4 d-block h-fit submit-btn m-2 py-1 fm-kufi-regular text-sm"}),(0,y.jsx)(i.$,{onClick:()=>(Ne.resetForm(),ee(!1),void se(null)),className:"action-btn col-lg-2 d-block col-sm-4 h-fit py-1 back-btn m-2 fm-kufi-regular text-sm",children:(0,s.t)("common.cancel")})]})]})})]})]})}},52772(e,a,l){l.d(a,{A:()=>t});var r=l(65043),s=l(73103),i=l(10357),n=l(49092),d=(l(82113),l(70579));function t(e){var a,l;let{onDisableNext:t,demo:o,onUpdateFormData:c,promiseToSell:h,installment:u,selling:m,withApartmentLand:v,buyersDetailsKey:S,buyerSellersMapperKey:x,expansionFactorKey:y,landExpansionFactorKey:b,accumilativeKey:f,sharesDivisorKey:p,landSharesDivisorKey:N,shareAccKey:g,landShareAccKey:j,sellersLandShareKey:D,showLandExpansionKey:k,sameBuyerSellerError:w,buyerName:I,buyerNationalId:L,sharesNeedsToBuy:F}=e;const{t:T}
1=(0,n.B)(),[A,K]=(0,r.useState)(0),O=(0,s.d4)(e=>e.sellingFormDetails);return(0,r.useEffect)(()=>{0},[m,O.landRegNo]),(0,r.useEffect)(()=>{var e;o||(null!==(e=O.buyerSellersMapperOk)&&void 0!==e&&e.buyerSellersMapper?t(!1):t(!0))},[o,null===(a=O.buyerSellersMapperOk)||void 0===a?void 0:a.buyerSellersMapper,null===(l=O.buyerSellersMapperOk)||void 0===l?void 0:l.buyerSellersMapperLand,O.landRegNo,m]),(0,d.jsx)(i.A,{demo:o,onHidePageActions:e=>{},onDisableNext:e=>{var a;e===Boolean(null===(a=O.buyerSellersMapperOk)||void 0===a?void 0:a.buyerSellersMapper)&&c({buyerSellersMapperOk:{...O.buyerSellersMapperOk,buyerSellersMapper:!e}})},onUpdateFormData:c,promiseToSell:h,installment:u,selling:m,withApartmentLand:v,buyerSellersMapperKey:x||"buyerSellersMapper",expansionFactorKey:y||"expansionFactor",landExpansionFactorKey:b||"landExpansionFactor",accumilativeKey:f||"accumilative",buyersDetailsKey:S,sharesDivisorKey:p,landSharesDivisorKey:N,shareAccKey:g,landShareAccKey:j,sellersLandShareKey:D,showLandExpansionKey:k,sameBuyerSellerError:w,buyerName:I,buyerNationalId:L,sharesNeedsToBuy:F})}}}]); 2//# sourceMappingURL=2772.a4fc417d.chunk.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.