"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[52491],{852491(e,t,i){i.r(t),i.d(t,{default:()=>b});var n=i(274934),r=i(602086),a=i(977872),c=i(843871),d=i(938984),s=i(215202),o=i(696916),A=i(950804),l=i(309130),u=i(869332),m=i(470070),p=i(120197),E=i(384783),h=i(100978);const C={feedback:""},O=A.A.object().shape({feedback:A.A.string().min(1).max(4096).required().label("COMMON_FEEDBACK")}),b=({onSubmit:e})=>{const t=(0,a.wA)(),{formatMessage:i}=(0,m.tz)(),[A,b]=(0,r.useState)(!1),x=()=>t((0,u.AS)()),f=(0,o.A)("firmware_downgrade_feedback");return(0,n.jsx)(c.l1,{initialValues:C,validationSchema:O,onSubmit:async({feedback:t})=>{if(!A&&f){b(!0);try{const i=await f();e(t,i)}catch(e){}finally{b(!1),x()}}},children:({handleSubmit:e,dirty:t,isValid:r,isSubmitting:a})=>(0,n.jsx)(E.A,{actions:[{text:(0,n.jsx)(m.sA,{id:"COMMON_ACTION_SKIP"}),type:"button",onClick:x},{text:(0,n.jsx)(m.sA,{id:"COMMON_ACTION_CONTINUE"}),type:"button",variant:"primary",disabled:A||!t||!r||a,onClick:e}],title:(0,n.jsx)(s.A,{variant:"medium",children:(0,n.jsx)(m.sA,{id:"DEVICE_ACTIONS_DOWNGRADE_FEEDBACK_TITLE"})}),size:"small",onRequestClose:x,allowOverflow:!0,children:(0,n.jsxs)(h.A,{gap:l.Ln,flexDirection:"column",children:[(0,n.jsx)(d.A,{variant:"body-primary",children:(0,n.jsx)(m.sA,{id:"DEVICE_ACTIONS_DOWNGRADE_FEEDBACK_MESSAGE"})}),(0,n.jsx)(p.A,{name:"feedback",type:"textarea",placeholder:i({id:"DEVICE_ACTIONS_DOWNGRADE_FEEDBACK_PLACEHOLDER"}),minHeight:"76px",maxHeight:"200px",maxWidth:"360px",minWidth:"360px",resize:!0})]})})})}},696916(e,t,i){i.d(t,{A:()=>o});var n=i(602086),r=i(977872),a=i(232087),c=i(594633),d=i(743178);const s={[a.OH.PRD]:"6Ld47OUpAAAAALQ4AgR1gfk-hnSw27y3zIMKLOSw",[a.OH.STG]:"6LeKc-UpAAAAAN6YqRab29cPCbU-cfe7_EvchSvc",[a.OH.DEV]:"6LeocOUpAAAAANmIju4N9DzlkK4UNYdYThrUkK3y"},o=e=>{const[t,i]=(0,n.useState)(),a=(0,n.useRef)(void 0),o=(0,r.d4)(c.S$),A=(0,d.GO)(o);return(0,n.useEffect)(()=>{const t=()=>{const{grecaptcha:n}=window;n?.enterprise.ready(()=>i(()=>()=>n.enterprise.execute(s[A],{action:e}))),a.current?.removeEventListener("load",t)};return"grecaptcha"in window?t():(a.current=document.createElement("script"),a.current.src=(e=>`https://www.google.com/recaptcha/enterprise.js?render=${s[e]}`)(A),a.current.addEventListener("load",t),document.body.appendChild(a.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)})()),()=>{a.current?.removeEventListener("load",t)}},[]),t}}}]);