<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE widget SYSTEM "rambler.dtd"><widget xmlns:f="http://bar.yandex.ru/dev/functional" icon="icons/ramblersend.png" name="&rambler.write.name;" unique="true" xmlns="http://bar.yandex.ru/dev/gui">
    <f:setting default="true" name="show_label" scope="widget">
        <control label="&rambler.write.settings.checktext;" type="checkbox"/>
    </f:setting>
    <f:data name="rlogin">
        <f:cookie>
            <f:value type="string">http://rambler.ru/</f:value>
            <f:value type="string">rlogin</f:value>
        </f:cookie>
    </f:data>
	<f:data name="rdomain">
        <f:cookie>
            <f:value type="string">http://rambler.ru/</f:value>
            <f:value type="string">rdomain</f:value>
        </f:cookie>
    </f:data>
	<f:data name="cookie">
        <f:if>
			<f:or>
                <f:is-empty>
                    <f:value-of name="rlogin"/>
                </f:is-empty>
                <f:is-empty>
                    <f:value-of name="rdomain"/>
                </f:is-empty>
            </f:or>
			<f:value type="string"/>
			<f:concat>
				<f:value-of name="rlogin"/>
				<f:value type="string">@</f:value>
				<f:value-of name="rdomain"/>
			</f:concat>
		</f:if>
    </f:data>
    <f:data name="rsid">
        <f:cookie>
            <f:value type="string">http://rambler.ru/</f:value>
            <f:value type="string">rsid</f:value>
            <f:value type="bool">true</f:value>
        </f:cookie>
    </f:data>
    <f:data name="is_logged">
        <f:and>
            <f:not>
                <f:is-empty>
                    <f:value-of name="rsid"/>
                </f:is-empty>
            </f:not>
            <f:not>
                <f:is-empty>
                    <f:value-of name="cookie"/>
                </f:is-empty>
            </f:not>
        </f:and>
    </f:data>
    <button>
        <url>
            <f:if>
                <f:value-of name="is_logged"/>
                <f:value type="string">&rambler.write_letter.url;</f:value>
                <f:value type="string">&rambler.notlogged.url;</f:value>
            </f:if>
        </url>
        <icon>
            <f:if>
                <f:value-of name="is_logged"/>
                <f:value type="string">icons/ramblersend.png</f:value>
                <f:value type="string">icons/ramblersendlock.png</f:value>
            </f:if>
        </icon>
        <text>
            <f:if>
                <f:value-of name="show_label"/>
                <f:value type="string">&rambler.write;</f:value>
                <f:value type="string"/>
            </f:if>
        </text>
        <f:optional>
            <f:not>
                <f:value-of name="is_logged"/>
            </f:not>
            <tooltip>
                <grid>
                    <row>
                        <cell>&rambler.write.tooltip.one;</cell>
                    </row>
                    <row>
                        <cell>&rambler.write.tooltip.two;</cell>
                    </row>
                </grid>
            </tooltip>
        </f:optional>
        <f:optional>
            <f:value-of name="is_logged"/>
            <tooltip>&rambler.write.tooltip.good;</tooltip>
        </f:optional>
    </button>
</widget>
