<?xml version="1.0" standalone="yes"?>
<!DOCTYPE container>
<container
    xmlns="http://www.w3.org/1999/xhtml"
    xmlns:var="http://www.skyrix.com/od/binding"
    xmlns:const="http://www.skyrix.com/od/constant"
    xmlns:label="OGo:label"
    >

  <md-dialog flex="60" flex-sm="80" flex-xs="100">
    <md-toolbar>
      <md-icon class="material-icons sg-icon-toolbar-bg">link</md-icon>
      <div class="md-toolbar-tools">
        <div class="pseudo-input-container md-flex">
          <label class="pseudo-input-label"><var:string label:value="Links to this Calendar"/></label>
          <div layout="row" layout-align="start center">
            <div class="sg-color-chip"
                 ng-class="::links.calendar.getClassName('bg')"><!-- color --></div>
            <div class="sg-md-title" ng-bind="::links.calendar.name"><!-- calendar --></div>
          </div>
        </div>
        <md-button class="md-icon-button" ng-click="links.close()">
          <md-icon label:aria-label="Close">close</md-icon>
        </md-button>
      </div>
    </md-toolbar>

    <md-dialog-content class="md-padding">
      <div layout="column">

        <md-input-container class="md-block" ng-show="::links.calendar.isWebCalendar">
          <label><var:string label:value="URL"/></label>
          <input type="text" ng-model="::links.calendar.urls.webCalendarURL" ng-readonly="true"/>
        </md-input-container>

        <div layout="column" ng-hide="::links.calendar.isWebCalendar">
          <div class="sg-md-title"><var:string label:value="Authenticated User Access"/></div>
          <md-input-container class="md-input-clipboard">
            <label><var:string label:value="CalDAV URL"/></label>
            <input id="user-caldav-url" type="text" ng-model="::links.calendar.urls.calDavURL" ng-readonly="true"/>
            <md-button aria-label="Copy to clipboard" class="md-icon-button" ng-click="links.clipboard('user-caldav-url')">
              <md-tooltip><var:string label:value="Copy to clipboard"/></md-tooltip>
              <md-icon label:aria-label="Copy Icon">content_copy</md-icon>
            </md-button>
          </md-input-container>
          <md-input-container class="md-input-clipboard">
            <label><var:string label:value="WebDAV ICS URL"/></label>
            <input  id="user-webdav-ics-url" type="text" ng-model="::links.calendar.urls.webDavICSURL" ng-readonly="true"/>
            <md-button aria-label="Copy to clipboard" class="md-icon-button" ng-click="links.clipboard('user-webdav-ics-url')">
              <md-tooltip><var:string label:value="Copy to clipboard"/></md-tooltip>
              <md-icon label:aria-label="Content_copy">content_copy</md-icon>
            </md-button>
          </md-input-container>
          <md-input-container class="md-input-clipboard">
            <label><var:string label:value="WebDAV XML URL"/></label>
            <input id="user-webdav-xml-url" type="text" ng-model="::links.calendar.urls.webDavXMLURL" ng-readonly="true"/>
            <md-button aria-label="Copy to clipboard" class="md-icon-button" ng-click="links.clipboard('user-webdav-xml-url')">
              <md-tooltip><var:string label:value="Copy to clipboard"/></md-tooltip>
              <md-icon label:aria-label="Content_copy">content_copy</md-icon>
            </md-button>
          </md-input-container>
        </div>

        <var:if condition="isPublicAccessEnabled">
          <div layout="column" ng-hide="::links.calendar.isWebCalendar">
            <div class="sg-md-title"><var:string label:value="Public Access"/></div>
            <md-input-container class="md-input-clipboard">
              <label><var:string label:value="CalDAV URL"/></label>
              <input id="public-caldav-url" type="text" ng-model="::links.calendar.urls.publicCalDavURL" ng-readonly="true"/>
              <md-button aria-label="Copy to clipboard" class="md-icon-button" ng-click="links.clipboard('public-caldav-url')">
                <md-tooltip><var:string label:value="Copy to clipboard"/></md-tooltip>
                <md-icon label:aria-label="Content_copy">content_copy</md-icon>
              </md-button>              
            </md-input-container>
            <md-input-container class="md-input-clipboard">
              <label><var:string label:value="WebDAV ICS URL"/></label>
              <input id="public-webdav-ics-url" type="text" ng-model="::links.calendar.urls.publicWebDavICSURL" ng-readonly="true"/>
              <md-button aria-label="Copy to clipboard" class="md-icon-button" ng-click="links.clipboard('public-webdav-ics-url')">
                <md-tooltip><var:string label:value="Copy to clipboard"/></md-tooltip>
                <md-icon label:aria-label="Content_copy">content_copy</md-icon>
              </md-button>              
            </md-input-container>
            <md-input-container class="md-input-clipboard">
              <label><var:string label:value="WebDAV XML URL"/></label>
              <input id="public-webdav-xml-url" type="text" ng-model="::links.calendar.urls.publicWebDavXMLURL" ng-readonly="true"/>
              <md-button aria-label="Copy to clipboard" class="md-icon-button" ng-click="links.clipboard('public-webdav-xml-url')">
                <md-tooltip><var:string label:value="Copy to clipboard"/></md-tooltip>
                <md-icon label:aria-label="Content_copy">content_copy</md-icon>
              </md-button>
            </md-input-container>
          </div>
        </var:if>
      </div>

    </md-dialog-content>
  </md-dialog>

</container>
