React = require 'react' _ = require 'underscore' {RetinaImg, Flexbox} = require 'nylas-component-kit' {LaunchServices, AccountStore} = require 'nylas-exports' class PreferencesGeneral extends React.Component @displayName: 'PreferencesGeneral' constructor: (@props) -> @state = {} @_services = new LaunchServices() if @_services.available() @_services.isRegisteredForURLScheme 'mailto', (registered) => @setState(defaultClient: registered) toggleDefaultMailClient: => if @state.defaultClient is true @setState(defaultClient: false) @_services.resetURLScheme('mailto') else @setState(defaultClient: true) @_services.registerForURLScheme('mailto') toggleShowImportant: (event) => @props.config.toggle('core.showImportant') event.preventDefault() _renderImportanceOptionElement: => return false unless AccountStore.current()?.usesImportantFlag() importanceOptionElement =