{"version":3,"file":"inputButtonPriceElementControllerChunk.js?v=23.134.0+20261102.30.bbbf8652390b5ce306040b1cece1df0dd99fac01&h=8f0b1115a1d540ad3486","mappings":"iJAAe,MAAMA,EAEnB,YAAmBC,GACjBC,KAAKD,QAAUA,EACfC,KAAKC,YACP,CAEQ,UAAAA,GACND,KAAKD,QAAQG,iBAAiB,SAAUC,GAAMH,KAAKI,mBAAmBD,KACtE,MAAME,EAAYC,SAASC,iBAAiB,+BAEvCF,EAMLA,EAAUG,SAASC,IACjBA,EAAMP,iBAAiB,WAAYQ,IACf,UAAdA,EAAMC,KACRX,KAAKD,QAAQa,O,GAEf,IAVFC,QAAQC,MACN,8DAWN,CAEQ,kBAAAV,CAAmBM,GACzBA,EAAMK,iBACN,MAAMC,EAAkBV,SAASW,cAC/B,gCAEIC,EAAkBZ,SAASa,eAC/B,oBAEIC,EAAiBd,SAASC,iBAC9B,qDAGF,GAAIS,EAAiB,CACnB,MAAMK,EAAgBrB,KAAKsB,cAAcF,GACzCF,EAAgBK,MAAQF,C,MAExBH,EAAgBK,MAAQ,EAE5B,CAEQ,aAAAD,CACNE,GAEA,IAAKA,EACH,OAAO,KAGT,IAAK,IAAIC,EAAI,EAAGA,EAAID,EAAUE,OAAQD,IAAK,CACzC,MACME,EADUH,EAAUC,GACGF,MAAMK,OACnC,GAAID,EAAaD,OAAS,EACxB,OAAOC,C,CAIX,OAAO,IACT,E","sources":["webpack://site-client-side/./ClientApp/components/inputButtonPriceElement/inputButtonPriceElementController.ts"],"sourcesContent":["export default class InputButtonPriceElementController {\n private readonly element: HTMLElement;\n public constructor(element: HTMLElement) {\n this.element = element;\n this.initialize();\n }\n\n private initialize() {\n this.element.addEventListener(\"click\", (e) => this.inputButtonClicked(e));\n const formInput = document.querySelectorAll(\".getSalePriceEntryFormInput\");\n\n if (!formInput) {\n console.debug(\n \"Element with class '.getSalePriceEntryFormInput' not found.\"\n );\n return;\n }\n formInput.forEach((input) => {\n input.addEventListener(\"keydown\", (event: KeyboardEvent) => {\n if (event.key === \"Enter\") {\n this.element.click();\n }\n });\n });\n }\n\n private inputButtonClicked(event: Event) {\n event.preventDefault();\n const salePriceButton = document.querySelector(\n \"#getSalePriceEntryFormButton\"\n );\n const emailInputModal = document.getElementById(\n \"ePriceModalEmail\"\n ) as HTMLInputElement;\n const emailFormValue = document.querySelectorAll(\n \"#getSalePriceEntryForm.getSalePriceEntryFormInput\"\n ) as NodeListOf;\n\n if (salePriceButton) {\n const modalInputVal = this.getEmailValue(emailFormValue);\n emailInputModal.value = modalInputVal;\n } else {\n emailInputModal.value = \"\";\n }\n }\n\n private getEmailValue(\n textBoxes: NodeListOf\n ): string | null {\n if (!textBoxes) {\n return null;\n }\n\n for (let i = 0; i < textBoxes.length; i++) {\n const textBox = textBoxes[i];\n const trimmedValue = textBox.value.trim();\n if (trimmedValue.length > 0) {\n return trimmedValue;\n }\n }\n\n return null;\n }\n}\n"],"names":["InputButtonPriceElementController","element","this","initialize","addEventListener","e","inputButtonClicked","formInput","document","querySelectorAll","forEach","input","event","key","click","console","debug","preventDefault","salePriceButton","querySelector","emailInputModal","getElementById","emailFormValue","modalInputVal","getEmailValue","value","textBoxes","i","length","trimmedValue","trim"],"sourceRoot":""}