var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");var _interopRequireWildcard=require("@babel/runtime/helpers/interopRequireWildcard");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _possibleConstructorReturn2=_interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));var _getPrototypeOf2=_interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));var _inherits2=_interopRequireDefault(require("@babel/runtime/helpers/inherits"));var _defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));var React=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _Modal=_interopRequireDefault(require("../Modal"));var _DialogContent=_interopRequireDefault(require("./DialogContent"));var _DialogActions=_interopRequireDefault(require("./DialogActions"));var _DialogTitle2=_interopRequireDefault(require("./DialogTitle"));var _DialogScrollArea=_interopRequireDefault(require("./DialogScrollArea"));var _theming=require("../../core/theming");var _jsxFileName="/Users/trensik/dev/react-native-paper/src/components/Dialog/Dialog.tsx";var Dialog=function(_React$Component){(0,_inherits2.default)(Dialog,_React$Component);function Dialog(){(0,_classCallCheck2.default)(this,Dialog);return(0,_possibleConstructorReturn2.default)(this,(0,_getPrototypeOf2.default)(Dialog).apply(this,arguments));}(0,_createClass2.default)(Dialog,[{key:"render",value:function render(){var _this$props=this.props,children=_this$props.children,dismissable=_this$props.dismissable,onDismiss=_this$props.onDismiss,visible=_this$props.visible,style=_this$props.style,theme=_this$props.theme;return React.createElement(_Modal.default,{dismissable:dismissable,onDismiss:onDismiss,visible:visible,contentContainerStyle:[{borderRadius:theme.roundness,backgroundColor:theme.colors.surface},styles.container,style],__source:{fileName:_jsxFileName,lineNumber:109}},React.Children.toArray(children).filter(function(child){return child!=null&&typeof child!=='boolean';}).map(function(child,i){if(i===0&&React.isValidElement(child)&&child.type===_DialogContent.default){return React.cloneElement(child,{style:[{paddingTop:24},child.props.style]});}return child;}));}}]);return Dialog;}(React.Component);(0,_defineProperty2.default)(Dialog,"Content",_DialogContent.default);(0,_defineProperty2.default)(Dialog,"Actions",_DialogActions.default);(0,_defineProperty2.default)(Dialog,"Title",_DialogTitle2.default);(0,_defineProperty2.default)(Dialog,"ScrollArea",_DialogScrollArea.default);(0,_defineProperty2.default)(Dialog,"defaultProps",{dismissable:true,visible:false});var styles=_reactNative.StyleSheet.create({container:{marginVertical:_reactNative.Platform.OS==='android'?44:0,marginHorizontal:26,elevation:24,justifyContent:'flex-start'}});var _default=(0,_theming.withTheme)(Dialog);exports.default=_default;
//# sourceMappingURL=Dialog.js.map