1define("Controls/popupConfirmation",["react/jsx-runtime","react","i18n!Controls","UI/Utils","UI/Focus","UI/Contexts","UI/Adaptive","Controls/scrollLite","Controls/buttons","Controls/Container/Async","require","exports","css!Controls/popupConfirmation"],(function(e,t,o,n,r,i,a,l,s,c,u,d){var m,f,p,_;return Object.defineProperty(d,"__esModule",{value:!0}),m=function(e,t,o,n,r,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default=function({type:e="yesno",primaryAction:t="yes",yesCaption:a=i("Ðа"),noCaption:l=i("ÐеÑ"),cancelCaption:s=i("ÐÑмена"),okCaption:c=i("ÐÐ"),...u}){const d=(0,r.useAdaptiveMode)(),m=()=>{switch(u.markerStyle){case"warning":return"warning";case"success":return"success";case"danger":return"danger";case"info":return"info";default:return"primary"}},f=(()=>{if(u.buttons)return[...u.buttons];else if("ok"===e)return[{caption:c,viewMode:"outlined",buttonStyle:"yes"===t?m():"secondary",value:!0}];else if("yesno"===e)return[{caption:a,viewMode:"outlined",buttonStyle:"yes"===t?m():"secondary",value:!0},{caption:l,viewMode:"outlined",buttonStyle:"no"===t?m():"secondary",value:!1}];else if("yesnocancel"===e)return[{caption:a,viewMode:"outlined",buttonStyle:"yes"===t?m():"secondary",value:!0},{caption:l,viewMode:"outlined",buttonStyle:"no"===t?m():"secondary",value:!1},{caption:s,viewMode:"outlined",buttonStyle:"cancel"===t?m():"secondary",value:void 0}]})();let p=!1;if(d.device.isPhone()&&(null==f?void 0:f.length)){const e=f.length;if(e>1){f.reverse();const t=f.findIndex((e=>"primary"===e.buttonStyle));if(-1!==t){const e=f[t];f.splice(t,1),f.push(e)}const o=f.reduce(((e,t)=>e+t.caption.length),0);if(2===e&&o>=20||3===e&&o>=15||e>3)p=!0}}const _=e=>{const t=e.viewMode||"outlined";return(0,o.jsx)(n.Button,{buttonStyle:e.buttonStyle,contrastBackgroun
1d:e.contrastBackground,fontColorStyle:e.fontColorStyle,viewMode:t,caption:e.caption,href:e.href,readOnly:void 0!==e.readOnly?e.readOnly:!1,target:e.target,"ws-autofocus":"primary"===e.buttonStyle,"data-qa":`controls-ConfirmationDialog__button-${e.value}`,className:"controls-ConfirmationDialog__button",onClick:()=>(e=>{if(u.onResult)u.onResult(e)})(e.value),context:u.context})};return(0,o.jsx)("div",{className:"controls-ConfirmationDialog__buttonContainer"+(p?"_vertical":""),children:null==f?void 0:f.map(((e,t)=>(0,o.jsx)("div",{className:`controls-ConfirmationDialog__button-${"link"===e.viewMode?"link":f.length>=3?"mini":"standard"}\n ${t>0?"controls-ConfirmationDialog__no-cancel-button":""}`,children:_(e)},e.caption)))})},t}(0,{},e,s,a,o),f=m,p=function(e,t,o,n,r,i,a,l,s,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0});return t.default=n.forwardRef((function(e,t){const u=(0,l.useAdaptiveMode)();n.useEffect((()=>{if(void 0!==e.style)i.Logger.warn("Controls.popup:Confirmation: ÐÑполÑзÑеÑÑÑ ÑÑÑаÑевÑÐ°Ñ Ð¾Ð¿ÑÐ¸Ñ style, нÑжно иÑполÑзоваÑÑ markerStyle");if(void 0!==e.borderStyle)i.Logger.warn("Controls.popup:Confirmation: ÐÑполÑзÑеÑÑÑ ÑÑÑаÑевÑÐ°Ñ Ð¾Ð¿ÑÐ¸Ñ borderStyle, нÑжно иÑполÑзоваÑÑ markerStyle");if(void 0!==e.size)i.Logger.warn("Controls.popup:Confirmation: ÐÑполÑзÑеÑÑÑ ÑÑÑаÑевÑÐ°Ñ Ð¾Ð¿ÑÐ¸Ñ size, нÑжно иÑполÑзоваÑÑ width")}),[]);const d=u.device.isPhone(),m=n.useMemo((()=>{var t,o;if(e.width)return null;if(e.size)return e.size;if((null==e?void 0:e.message)&&(null===(t=e.message)||void 0===t?void 0:t.length)>100||(null==e?void 0:e.details)&&(null===(o=e.details)||void 0===o?void 0:o.length)>160)return"l";else return"s"}),[e.size,e.width,e.message,e.details]),f=()=>{switch(e.style||e.borderStyle||e.markerStyle){case"warning":return"warning";case"success":return"success";case"danger":return"danger";case"info":return"info";case"none":return"none";default:return"secondary"}},p=e=>{if(e){const t=e;return e.isWasabyTemplate||"function"==typeof e?(0,o.jsx)(t,{}):e}},_=()=>{if(e.onClose)e.onClose()};let y="controls-ConfirmationTemplate__body";y+=` controls-ConfirmationTemplate__style-${f()}`;let C="controls-ConfirmationTemplate__footer";if(d)C+=" controls-ConfirmationTemplate__footer_adaptive";return(0,o.jsx)(r.FocusRoot,{as:"div",className:`controls_popupTemplate_theme-${(0,s.useTheme)(e)} controls-ConfirmationTemplate\n ${(()=>{let t="";if(e.className)t+=` ${e.className}`;else if(null==e?void 0:e.className)t+=` ${e.className}`;return t})()} ${(()=>{const t=Number(e.width);if(e.width&&Number.isNaN(t))return"controls-ConfirmationTemplate__width-"+e.width;else if("s"===m||"m"===m)return"controls-ConfirmationTemplate__width-d";else if("l"===m)return"controls-ConfirmationTemplate__size-l"})()} controls-Popup__isolatedFocusingContext`,cycling:!0,ref:t,tabIndex:0,onKeyDown:e.onKeyDown,onKeyUp:e.onKeyUp,style:{width:`${(()=>{if("number"==typeof e.width)return e.width})()}px`},children:(0,o.jsxs)("div",{className:y,children:[(0,o.jsx)("div",{className:"controls-ConfirmationTemplate__marker__container tw-shrink-0",children:(0,o.jsx)("div",{className:`controls-ConfirmationTemplate__marker controls-ConfirmationTemplate__marker__style-${f()}`,"data-qa":`controls-ConfirmationTemplate__marker__style-${f()}`})}),(0,o.jsx)("div",{className:"controls-ConfirmationTemplate__close-button",children:(()=>{if(e.closeButtonVisible&&!d){const t={viewMode:e.closeButtonViewMode||"linkButton",className:"controls-DialogTemplate__close_button controls-DialogTemplate__close_button_size-m",onClick:_};return(0,o.jsx)(a.default,{templateName:"Controls/extButtons:CloseButton",templateOptions:t})}})()}),(0,o.jsx)("div",{className:"controls-ConfirmationTemplate__main"+(d?" controls-ConfirmationTemplate__main_adaptive":""),"data-qa":"controls-ConfirmationTemplate__main",children:d?(0,o.jsx)(c.Scroll,{className:"controls-ConfirmationTemplate__main-scroll",children:p(e.bodyContentTemplate)}):p(e.bodyContentTemplate)}),(0,o.jsx)("div",{className:e.footerContentTemplate&&C,"data-qa":"controls-ConfirmationTemplate__footer",children:p(e.footerContentTemplate)})]})})})),t}(0,{},e,t,r,n,c,a,i,l,"undefined"==typeof css_Controls_popupConfirmation||css_Controls_popupConfirmation),_=p,d.Footer=d.Template=void 0,Object.defineProperty(d,"Template",{enumerable:!0,get:function(){return _.default}}),Object.defineProperty(d,"Footer",{enumerable:!0,get:function(){return f.default}}),d}));
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.