import{__assign as o}from'./../../../ext-esm/tslib/tslib.es6.js';import{jsx as t,jsxs as i,Fragment as s}from"react/jsx-runtime";import{useState as n}from"react";import{makeStyles as e,MenuItem as r,TextField as c}from"@material-ui/core";import m from"../../Modal/Modal.js";import a from"../../Button/components/Button/index.js";import"moment-timezone";import"classnames";import"../../../icons/WithCustomSize.js";import"../../../icons/IconParkProvider.js";import"../../../icons/customIcons/icons/AddMessage.js";import"../../../icons/customIcons/icons/Attention.js";import"../../../icons/customIcons/icons/Collapse.js";import"../../../icons/customIcons/icons/Expand.js";import"../../../icons/customIcons/icons/FolderClosed.js";import"../../../icons/customIcons/icons/FolderClosedFilled.js";import"../../../icons/customIcons/icons/FolderOpened.js";import"../../../icons/customIcons/icons/GreaterOrEqual.js";import"../../../icons/customIcons/icons/LessOrEqual.js";import"../../../icons/customIcons/icons/Search.js";import"../../../icons/customIcons/icons/Wellhub.js";import"../../../icons/customIcons/icons/MultiRuler.js";import"../../../icons/customIcons/icons/Checkbox.js";import"../../../icons/customIcons/icons/CheckboxChecked.js";import"../../../icons/customIcons/icons/CheckboxIndeterminate.js";import"../../../icons/customIcons/icons/Radio.js";import"../../../icons/customIcons/icons/RadioChecked.js";import"../../../icons/customIcons/icons/SimulFrac.js";import"../../../icons/customIcons/icons/ZipperFrac.js";import"../../../icons/customIcons/icons/CautionFilled.js";import"../../Button/components/LiveButton/components/LiveButtonStateIndicator/index.js";import"../../Button/components/LiveButton/styles.js";import l from"../../Select/index.js";import{truncateString as u}from"../../Search/utils/truncate.js";var p=e((function(o){return{container:{width:472,color:o.palette.primary.text6,display:"flex",flexDirection:"column",gap:16},helpText:{fontSize:16,lineHeight:"22px"},clearAllButton:{margin:"0 16px 0 auto"},textField:{"& .MuiInput-formControl":{marginTop:8}},popover:{marginTop:8,maxHeight:500,width:"100%"}}})),d=function(e){var d,h=e.assets,j=e.onSave,I=e.onClose,v=p(),f=n(""),x=f[0],C=f[1],g=n(null===(d=h[0])||void 0===d?void 0:d.id),F=g[0],b=g[1],S=h.length>1;return t(m,o({open:!0,onClose:I,title:"Report Data Quality Issue",actions:i(s,{children:[t(a,o({color:"primary",className:v.clearAllButton,onClick:I},{children:"Cancel"})),t(a,o({disabled:!x||S&&!F,onClick:function(){j(x,F),C(""),b(""),S||I()},variation:"primary"},{children:"report data issue"}))]})},{children:i("div",o({className:v.container},{children:[t("div",o({className:v.helpText},{children:"All issues are submitted to the Corva’s 24/7 Fusion data quality team for immediate review and remediation."})),S&&t(l,o({MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},PopoverClasses:{root:v.popover}},label:"Select Asset",onChange:function(o){return b(o.target.value)},value:F},{children:h.map((function(i){return t(r,o({value:i.id},{children:u(i.name,{maxChars:50,charsNumFromStart:26,charsNumFromEnd:24})}),i.id)}))})),t(c,{className:v.textField,multiline:!0,rows:1,rowsMax:4,label:"Error Description",onChange:function(o){return C(o.target.value)},value:x})]}))}))};export{d as ReportIssueModal};
