"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[17704],{217704(e,t,n){n.r(t),n.d(t,{default:()=>O});var a=n(296540),r=n(469733),i=n(951272),c=n(217439),d=n(170121),s=n(131147),l=n(870443),o=n(566723),A=n(126457),m=n(916537),E=n(143811),u=n(705426),p=n(294303);const h={feedback:""},C=l.A.object().shape({feedback:l.A.string().min(1).max(4096).required().label("COMMON_FEEDBACK")}),O=({onSubmit:e})=>{const t=(0,r.useDispatch)(),{formatMessage:n}=(0,m.tz)(),[l,O]=(0,a.useState)(!1),b=()=>t((0,A.AS)()),f=(0,s.A)("firmware_downgrade_feedback");return a.createElement(i.l1,{initialValues:h,validationSchema:C,onSubmit:async({feedback:t})=>{if(!l&&f){O(!0);try{const n=await f();e(t,n)}catch(e){}finally{O(!1),b()}}}},({handleSubmit:e,dirty:t,isValid:r,isSubmitting:i})=>a.createElement(u.A,{actions:[{text:a.createElement(m.sA,{id:"COMMON_ACTION_SKIP"}),type:"button",onClick:b},{text:a.createElement(m.sA,{id:"COMMON_ACTION_CONTINUE"}),type:"button",variant:"primary",disabled:l||!t||!r||i,onClick:e}],title:a.createElement(d.A,{variant:"medium"},a.createElement(m.sA,{id:"DEVICE_ACTIONS_DOWNGRADE_FEEDBACK_TITLE"})),size:"small",onRequestClose:b,allowOverflow:!0},a.createElement(p.A,{gap:o.Ln,flexDirection:"column"},a.createElement(c.A,{variant:"body-primary"},a.createElement(m.sA,{id:"DEVICE_ACTIONS_DOWNGRADE_FEEDBACK_MESSAGE"})),a.createElement(E.A,{name:"feedback",type:"textarea",placeholder:n({id:"DEVICE_ACTIONS_DOWNGRADE_FEEDBACK_PLACEHOLDER"}),minHeight:"76px",maxHeight:"200px",maxWidth:"360px",minWidth:"360px",resize:!0}))))}},131147(e,t,n){n.d(t,{A:()=>l});var a=n(296540),r=n(469733),i=n(874734),c=n(417378),d=n(778851);const s={[i.OH.PRD]:"6Ld47OUpAAAAALQ4AgR1gfk-hnSw27y3zIMKLOSw",[i.OH.STG]:"6LeKc-UpAAAAAN6YqRab29cPCbU-cfe7_EvchSvc",[i.OH.DEV]:"6LeocOUpAAAAANmIju4N9DzlkK4UNYdYThrUkK3y"},l=e=>{const[t,n]=(0,a.useState)(),i=(0,a.useRef)(),l=(0,r.useSelector)(c.S$),o=(0,d.GO)(l);return(0,a.useEffect)(()=>{const t=()=>{const{grecaptcha:a}=window;a?.enterprise.ready(()=>n(()=>()=>a.enterprise.execute(s[o],{action:e}))),i.current?.removeEventListener("load",t)};return"grecaptcha"in window?t():(i.current=document.createElement("script"),i.current.src=(e=>`https://www.google.com/recaptcha/enterprise.js?render=${s[e]}`)(o),i.current.addEventListener("load",t),document.body.appendChild(i.current),(()=>{const e="hide-grecaptcha-badge";if(document.getElementById(e))return;const t=document.createElement("style");t.id=e,t.innerText=".grecaptcha-badge { visibility: hidden; }",document.head.appendChild(t)})()),()=>{i.current?.removeEventListener("load",t)}},[]),t}}}]);