1"use strict";(self.webpackChunk_metafox_react=self.webpackChunk_metafox_react||[]).push([["metafox-form-elements-UploadPhotoAlbum-SimpleUploadPhotos"],{91422:function(e,o,t){t.r(o),t.d(o,{default:function(){return y}});var r=t(62809),l=t(59751),a=t(21275),i=t(65732),n=t(74439),s=t(24476),p=t(83059),d=t(81141),u=t.n(d),m=t(30758);let c="simpleUploadPhotos",h=(0,s.Ay)("div",{name:c,slot:"root"})(({theme:e})=>({display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"})),f=(0,s.Ay)(i.A,{name:c,slot:"root"})(({theme:e})=>({fontWeight:e.typography.fontWeightBold,fontSize:e.typography.pxToRem(18)})),g=(0,s.Ay)("div",{name:c,slot:"ButtonWrap",shouldForwardProp:e=>"size"!==e&&"isProfilePage"!==e})(({theme:e,size:o,isProfilePage:t})=>({display:"flex",alignItems:"center",justifyContent:"center",border:e.mixins.border("secondary"),borderColor:"light"===e.palette.mode?e.palette.border.primary:"rgba(255, 255, 255, 0.23)",height:e.spacing(4.75),marginTop:e.spacing(1),..."small"===o&&{borderRadius:e.shape.borderRadius,padding:e.spacing(0,1)},..."small"!==o&&{height:125,width:"100%"},..."small"!==o&&{height:t?170:125,width:"100%"},"&:hover":{cursor:"pointer",backgroundColor:e.palette.button.hover,borderColor:"light"===e.palette.mode?e.palette.border.primary:"#fff"},"& .MuiButton-root.MuiButton-text:hover":{backgroundColor:"transparent"}})),b=(0,s.Ay)(n.A,{name:c,slot:"FormControl",shouldForwardProp:e=>"size"!==e})(({theme:e,size:o})=>({..."small"!==o&&{marginTop:e.spacing(0),marginBottom:e.spacing(0)}}));function y({name:e,formik:o,config:t}){let{size:i=null}=t,{i18n:n,dialogBackend:s}=(0,r.PCX)(),d=(0,l.HX)(),[,c,{setValue:y}]=(0,p.Mt)(null!=e?e:"simpleUploadPhotos"),[C,P]=m.useState([]),[v,x]=m.useState(!1);m.useEffect(()=>{(null==d?void 0:d.profile_page)&&x(!0)},[d]);let A=t.placeholder||"add_photos_video";m.useEffect(()=>{y(C)},[C]);let k=(0,m.useCallback)(()=>{s.present({component:"photo.dialog.ChooseAlbumItemDialog",props:{config:t,fileItems:C,setFileItems:P,isDetailAlbum:!0,formik:o}})},[]),E=!!(c.error&&(c.touched||o.submitCount));return m.useEffect(()=>{E&&(s.alert({message:c.error}),y([]))},[E,null==c?void 0:c.error,C]),m.createElement(b,{size:i,error:E,fullWidth:!0,margin:"normal","data-testid":u()(`field ${e}`)},m.createElement(h,null,m.createElement(g,{size:i,isProfilePage:v,onClick:k},m.createElement(f,{size:"medium",color:"primary",startIcon:m.createElement(a.s4,{icon:"ico-photos-plus-o"})},n.formatMessage({id:A})))))}}}]);
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.